Get AI SEO for FREE.

Learn More!
How to Hide a Page in WordPress

How to Hide a Page in WordPress

84 / 100

Let’s face it: everyone loves sharing stories, ideas, and creations with the world through WordPress websites.

But what if, just for a moment, you want to keep something under wraps and hide a page in WordPress?

Maybe it’s an exclusive VIP page, a work-in-progress, or something you’re not ready to reveal yet. Well, that’s where the art of hiding a page in WordPress comes into play!

Whether you’re a tech whiz or a newbie just getting started, we’re here to help you discover the magic trick that allows you to hide a page in WordPress.

But before we begin, let’s discuss the need to hide a page and the benefits that this feature offers.

1 The Need for Hiding a Page in WordPress

Sometimes, while creating websites with WordPress, you might have a page you don’t want everyone to see.

Imagine you’re designing a new page or writing a blog post, but it’s not ready for the public yet. Hiding it lets you work on it in secret until it’s perfect.

Maybe you have something special that only certain people should access, like a members-only section. You can then choose to hide it from the general audience.

When fixing or updating a page, you might want to temporarily hide it so visitors don’t see a messy, half-finished version.

Benefits and scenarios where this feature is useful

Hiding a page in WordPress can be helpful for various situations:

  1. Maintain Professionalism: It keeps your website looking professional by preventing visitors from seeing incomplete or messy pages.
  2. Exclusive Access: You can offer exclusive content to specific groups, like registered users or subscribers, by hiding it from the general public.
  3. Avoid Spoilers: If you’re planning a surprise or announcement, hiding the relevant page keeps your secret safe until you’re ready to reveal it.
  4. Organize Your Work: It’s a great way to organize your work behind the scenes, especially if you have multiple contributors or editors.
  5. Focus on Improvement: When testing changes or improvements on your website, you can hide the page until you’re sure everything works perfectly.

So, hiding a page in WordPress isn’t just about secrecy; it’s a valuable tool for maintaining control over your website’s content and ensuring visitors have a smooth, professional experience.

2 How to Hide a Page in WordPress

We’ll now discuss various methods to hide a page in WordPress.

2.1 Hide a Page in WordPress Using Rank Math

Rank Math provides you with an option to hide pages. It is one of the most popular plugins, with over 2.18+ million active users.

If you haven’t already installed the plugin, you can install and activate it from the WordPress repository. You can further refer to our guide on installing WordPress plugins.

Once the plugin is installed and activated, navigate to the post/page you want to hide in your WordPress dashboard.

Navigate to the post

In the post-editing screen, you’ll find the Rank Math meta box. If it’s not visible, please refer to our article that’ll help you to make your metabox visible.

Now, in the meta box, navigate to the Advanced tab. Under the ROBOTS META section, you’ll see options to control search engine indexing and following. To hide the page from search engines, select No Index and Nofollow, as shown below.

Hide a page in WordPress using Rank Math

Note: You need to switch to Advanced Mode to see the Advanced option in the single post editor if you want to change it for a particular post. 

After selecting these options, click the Update button(if you’re editing an existing page) or the Publish button(if you’re creating a new page).

Your page will now be set to No Index and Nofollow, which means search engines won’t crawl or index it.

You can refer to our dedicated tutorial on Noindex URLs with Rank Math.

2.2 Hide a Page in WordPress by Password Protecting It

Hiding a page in WordPress by password-protecting is a straightforward process that allows you to restrict access to the page with a password.

To do so, navigate to the post/page you want to hide.

Click Public in the Visibility section in the right-hand menu, as shown below. By default, it’s set to Public. Now select Password protected from the options that appear in the editor.

Password Protect page

A field to enter a password will appear below. Enter a strong password in the field provided. Make sure it’s something not easily guessed.

Add a password

Once done, click Update/Publish to save the changes. When you share the link to this page with others, they’ll be prompted to enter the password to access it.

Password Protected Page

Remember to keep the password safe and only share it with those who should have access to the hidden page. This method is useful for adding a layer of privacy to specific content without making it completely public.

2.3 Hide a WordPress Page Using robots.txt

Another method to hide a WordPress page is by editing the robots.txt file.

If you’re new to WordPress and just starting to explore how to hide a page, we advise you not to use this method. If you make mistakes while formatting your robots.txt file, it can negatively impact your website’s SEO.

Google also does not recommend using this method.

Google warning

To begin with, first, locate your robots.txt file using your file manager or an FTP client like FileZilla. The file will be located in your site’s root directory.

Open the file and add the following lines of code:

User-agent: *
Disallow: /your-page/

For instance, assume you want to hide a post with a URL like this:

http://example.com/2023/10/my-post/

Here’s how your code will look like:

User-agent: *
Disallow : /2023/10/my-post/

Once done, save your changes and upload the robots.txt file back to your server.

3 Conclusion

Mastering the art of hiding pages in WordPress is a valuable skill that allows you to precisely control your content’s visibility.

By following the methods outlined in this post, you can easily navigate the process of hiding pages, ensuring your website maintains a professional and polished appearance.

This control over content visibility is crucial for providing your audience with a seamless and tailored experience.

Did you ever hide your pages from search engines? Which methods did you apply? Let us know by Tweeting @rankmathseo.

Email Icon

Don’t Miss Any Future Post!

Sign up today for Exclusive SEO Articles