Hey there welcome to WPBeginner and
thanks for tuning in. In this video I'll
show you how you can hide a WordPress
page or a post from Google a lot of
times this might be a good idea if
you're looking to keep something like
say a thank you page from being indexed
on Google search results or maybe
there's a hidden page that you don't
want indexed by Google. I'll show you two
methods that you can use to do this and
then stick around because then I'll also
show you a way that you can control the
visibility of a page as well. The first
method I'll cover actually involves a
plugin so let's go ahead and head over
to our WordPress dashboard. Let's go over
to plugins add new and if you've had
your website for a while you should
probably already have this plugin we'll
be using in installing the Yoast SEO
plugin. This is a great plugin to use and
have on your site to improve your site's
SEO and it's one of the top most popular
SEO plugins to have so let's install
that and then you also want to activate
it and now you see that it's activated
you see it also over here if you want
to go deeper into it on how to set that
up visit our tutorial that walks you
through how to set this up step by step
as well. Now that we have it installed
let's go to the page that we want to
hide from search engines if you'll scroll
down you'll see an area for the Yoast
plugin. Let's click on the gear area
and from here we want to do two things from
this drop-down we want to select no
index and we also want to select
nofollow and that means that the Google
search engine or any of the search
engines that deal with these types of
meta robots index they will do a no
index, that means they will not index the
page, and then they will also do a
nofollow which means they will not
follow any of the links past that. So you
click update and you know it's worked
when we do this. Let's open up this page
and right click and open up this page
and now I want to right click and view
page source and then up at the meta area
you see the meta name
robot content and that means no index
and no follow so Google won't index your
page and they won't follow it the second
method that we'll use actually deals with
editing the robots.txt file directly and
I'm going to take this out of full
screen so you'll see this so the
robots.txt file is found on anybody's site
here. If you have one installed and you
see that this is a typical robots.txt
file to edit that directly you will want
to go ahead and create a robots.txt file
on your computer go ahead and add the
page that you don't want indexed here
when you save this you will need to
upload it to your website using an ftp
and you'll want to put it into the root
folder of your website. Now there are
some disadvantages to using it like this
for one as you can tell the robots.txt
is visible to anybody. Anybody can go
to this page and see what your
disallowing or what you're not indexing
and the other thing is while some search
engines will follow the instructions in
the robots.txt file there are other
callers that might just ignore it now
let's head back over to our dashboard
area because there's another way that
you can do this. So this is the page that
I said noindex nofollow. If you want
instead of using the noindex nofollow,
if you're really just not wanting users to
see your page then you can go and set
this up to a password protect so you go
over to the visibility, click on the edit,
and instead of public put password
protect, add the password that you want,
click ok, click update in so anybody who
wants to access this page they'll have
to know the password in order to see it
and view the contents of it. So if your
ultimate goal is to just not have
certain users see it then this would be a
great idea. Did you learn something
helpful from today's video if so make
sure you subscribe to our YouTube
channel right now just click on the
subscribe button right here and thanks
for watching