How To Hide WordPress Page (5 Easy Solutions)
Today, we’re going to walk you through a simple process to hide a page on your WordPress website. This can be particularly useful if you want to keep certain content private or under development.
The Importance of Controlling Page Visibility
Controlling which pages are indexed by search engines can be vital for privacy, strategic, or SEO-related reasons.
Whether you’re managing sensitive content or tailoring your site’s SEO, understanding how to effectively hide pages from Google is an essential skill.
5 Methods to Hide WordPress Page (from Google or Users)
Method 1: Using Yoast SEO Plugin
The first method involves the Yoast SEO plugin, a powerful tool for website SEO management.
If you haven’t installed Yoast SEO yet, you can find a setup guide in the description below.
Here’s how you can use it to hide a page:
- Install the Yoast SEO plugin.
- Navigate to any post or page you wish to hide and click ‘Edit’.
- Scroll down to the Yoast SEO settings at the bottom.
- Click on the gear icon, and under the ‘Allow search engines to show this post in search results?’ option, select ‘No’.
- Also, choose ‘No’ for ‘Should search engines follow links on this post?’.
- Update the page.
This process adds a ‘no index, no follow’ robot meta tag to your page, instructing search engines not to index or follow links on this page.
A Quick Note:
As we can read in Google’s documentation: “When Googlebot crawls that page and extracts the tag or header, Google will drop that page entirely from Google Search results, regardless of whether other sites link to it. (…)Be aware that some search engines might interpret the noindex rule differently. As a result, your page might still appear in results from other search engines.”
Method 2: Changing Post Visibility
The third method is to change the visibility settings of your post:
- In your post editor, locate the ‘Visibility’ setting in the ‘Publish’ meta box.
- Change visibility to either ‘Private’ or ‘Password Protected’, and set a password if necessary.
This method is straightforward but less effective for larger-scale privacy needs. For extensive content restriction, consider using a membership plugin.
Method 3: Set Status to Draft
Setting a Page to Draft in WordPress
If your page isn’t ready for the public eye, WordPress offers a simple yet effective solution: setting the page to draft.
This feature is ideal for when you’re still working on content, awaiting approval, or simply not ready to publish. Let’s explore how to use this feature:
How to Set a Page to Draft:
- Access the Page Editor: First, log into your WordPress dashboard. Navigate to the ‘Pages’ section and click on the page you wish to edit.
- Change the Page Status: In the page editor, locate the ‘Publish’ meta box, typically found on the right-hand side of the screen. Here, you’ll see the ‘Status’ of the page, which is likely set to ‘Published’ if the page is live.
- Edit the Status: Click on the ‘Edit’ link next to ‘Status’. A dropdown menu will appear with different options, including ‘Draft’. Select ‘Draft’ from this menu.
- Save Changes: After selecting ‘Draft’, click ‘OK’ to confirm the change, and then ‘Update’ to save these changes. Your page is now in draft mode and won’t be visible to the public.
Benefits of Setting a Page to Draft:
- Privacy and Control: You maintain control over the content until it’s ready to be viewed.
- Flexibility: It allows you to work on updates or new content without pressure, knowing it’s not live.
- Testing and Feedback: You can share the draft with others for feedback before making it public.
Remember, while the page is in draft mode, it won’t appear on your live site, but it’s easily accessible to you and your team for any edits or updates.
Method 4: Using a Dedicated Plugin
If either of the solutions above doesn’t work for you, you can use a plugin called “Unlist Posts & Pages“, here’s how to do it:
Step 1: Install and Activate the Plugin
Once you find the right plugin, click ‘Install Now’. After the installation is complete, make sure to activate the plugin. This step is crucial for the plugin to work.
Step 2: Edit the Desired Page
Next, navigate to the ‘Pages’ section of your WordPress dashboard. Here, find the page you want to hide – in this case, the blog page – and click ‘Edit’.
Step 3: Utilize the New Plugin Option
In the page editor, you’ll notice a new option on the right-hand side labeled ‘Unlist Post’. Initially, this option will be unchecked, which means your page is currently visible.
Step 4: Hide Your Page
To hide your page, simply check the ‘Unlist Post’ box. Then, update your page to apply these changes.
Now, if you go to the front end of your website and refresh the page, you’ll notice the post has disappeared. It won’t be found even if you search for it using the WordPress search.
The only way to access the page is if someone knows the exact URL or you share the link directly.
Method 5: Editing the Robots.txt File (Not Recommended, Read Why Below)
The next method involves the robots.txt file, which gives instructions to web crawlers about which pages to access or ignore. To edit this file:
- Check if you have a robots.txt file by visiting yourdomain.com/robots.txt.
- If you don’t have one, create it in your website’s root directory.
- Edit the file to disallow access to specific pages by adding their URLs after a ‘Disallow:’ line.
A few notes:
Remember, the robots.txt file is publicly accessible, meaning anyone can view which pages you’re hiding.
If the page is blocked by a robots.txt file or the crawler can’t access the page, the crawler will never see the noindex
rule, and the page can still appear in search results, for example, if other pages link to it.
Conclusion:
There you have it – three effective ways to hide a WordPress page from Google. Each method has its advantages and drawbacks, so choose the one that best fits your needs.