How to Hide a Page in WordPress (3 Easy Methods)

hide a page in wordpress

WordPress is a great tool for creating a website, but sometimes you may need to hide a page of your website. If you don’t know how to hide a page in WordPress, then you are in the right place. It will take a moment to hide a page in WordPress. 

Here, I will show you three different methods to hide a page in your WordPress site of yours. You can use any method, but method one is recommended. 

Let’s check the details. 

How to Hide a Page in WordPress

WordPress provides a number of choices for modifying the text and style of websites. It’s got so many, in reality, that it can be tricky to set it up for a new post in a single sitting. Often you want to hide a page that you’re editing and go back and finish it later.

Method 1: Using ‘No Index’ Meta Tag

This is the recommended way to hide a page in WordPress. In this method, you need to install the RankMath plugin to WordPress site of yours. After the installation is complete, don’t forget to activate the plugin. 

Now open the post/page that you want to hide. Then click on the settings button on the top right corner of the post/page. 

Head over to the Advanced tab. From the Robots Meta, place a tick on ‘No Index’. 

Save Changes by clicking on Publish or Update button. 

Method 2: Using robots.txt File

This is the second method to hide a page in WordPress, though this method is not recommended if you are a beginner. Incorrectly formatting your robots.txt file can hurt your SEO. Therefore method 1 is recommended for you. 

To edit the robots.txt file, you have to connect your website via an FTP client. If you don’t know how to connect website, you can check this guide

After connecting the website, open the file manager and navigate to the root directory of your website. Open robots.txt. 

Now add the following lines of the code to your robots.txt file. 

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

Wait a minute; applying the exact code won’t work. You have to modify it with your page link. For example, let’s assume, your website URL is 

https://ultimateblocks.com/blog/how-to-hide-a-page-in-wordpress

Then you have to add the below code to your robots.txt file:

User-agent: *
Disallow: /blog/how-to-hide-a-page-in-wordpress/

If you don’t find any robots.txt file, then simply create one. 

Method 3: Password Protect the Post/Page

Here is the last method to hide a page in WordPress. With this method, you don’t need to install a plugin. Just open the page/post and click on the settings icon located at the top right corner of your page/post. Now click on the settings button. 

From the publish menu, click on the Visibility option. You can either select the private option or select password protected. If you choose the private option, then your admins will still be able to see the post/page. Therefore to hide the page, it is recommended to use password-protected option. 

When you select the password-protected option, make sure you provide a strong password and then hit Enter button. Afterward, press Publish or Update button. 

Conclusion

I hope now you have learned how to hide a page in WordPress. If you have any queries, then feel free to ask in the comment box below. If you liked the post then share it with your friends.

Leave a Comment

Your email address will not be published. Required fields are marked *