If you’re like me, you love creating and sharing content on your WordPress site.
But sometimes, you don’t want every page out in the open for the world to see. Maybe you’re working on a draft, building an exclusive page for clients, or keeping something private until it’s ready.
The good news is that you can easily hide a page in WordPress is simple, and you don’t need to be a developer to do it.
In this post, I’ll walk you through easy ways to hide a page, so you can stay in control of what your visitors see and when they see it.
So, without any further ado, let’s get started.
Table Of Contents
1 The Need for Hiding a Page in WordPress
When building your WordPress site, there are times when you don’t want every page visible right away. Maybe you’re drafting a new post or designing a page that still needs polishing. By hiding it, you can keep working in the background until it’s ready to go live.
You might also want to create exclusive content, like a members-only section or a private client page, that’s not meant for everyone. And if you’re updating or fixing a page, hiding it temporarily ensures visitors don’t see a messy, half-finished version.
Benefits of Hiding a Page
Hiding a page in WordPress comes with several advantages:
- Maintain professionalism: Keep unfinished or messy pages away from public view.
- Offer exclusive access: Share private content with specific users, subscribers, or clients.
- Avoid spoilers: Keep special announcements or surprises under wraps until the right time.
- Stay organized: Manage drafts and edits behind the scenes, especially with multiple contributors.
- Test safely: Experiment with updates or improvements without affecting the live site.
So, hiding a page isn’t just about keeping things secret; it’s about staying in control, protecting your work, and giving visitors the best possible experience.
2 How to Hide a Page in WordPress
There are different ways to hide a page in WordPress. Let’s start with one of the easiest methods, using the Rank Math SEO plugin.
2.1 Hide a Page in WordPress Using Rank Math
Rank Math SEO is one of the most popular SEO plugins, with over 3 million active users. It gives you simple options to keep certain pages private or prevent search engines from indexing them.
If you haven’t installed Rank Math yet, you can find it in the WordPress plugin repository. Install and activate it to get started.
Need help? Check out 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.
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.

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 prevents unwanted users from accessing it.
To do so, navigate to the post/page you want to hide.
Click Published in the Status section in the right-hand menu, as shown below. By default, it’s set to Published. Now select Password protected from the options that appear in the editor.

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.

Once done, click Save/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.

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 and preventing search engines from crawling the page.
If you’re new to WordPress and just starting to explore how to hide a page, I recommend not using 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.

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.
You can easily edit your robots.txt file in Rank Math SEO. To do so, navigate to Rank Math SEO → General Settings from your WordPress dashboard. Click Edit robots.txt, as shown below.

Add the code snippet and once done, save your changes.
3 Conclusion
Hiding a page in WordPress gives you more control over your content and how it appears to both visitors and search engines.
Whether you’re keeping a page private, limiting access to members, or blocking search engines from indexing it, you have simple tools to manage visibility.
By using these methods, you can keep your site looking professional, stay organized, and create a smoother experience for your visitors. And the best part? You can do it all in just a few clicks. 🚀
Have you ever hidden a page on your WordPress site? Which methods did you apply? Share your experience with us by tweeting @rankmathseo. We’d love to hear which method worked best for you!