It might be that you’re blocking Google without knowing it. That means that Google won’t index all the pages of your website. In this article, you’ll learn how to block Google and how to make sure that you do not block Google inadvertently.
1. Errors in the robots.txt file of your website will keep Google away
The disallow directive of the robots.txt file is an easy way to exclude single files or whole directories from indexing.
To exclude individual files, add this to your robots.txt file:
To exclude whole directories, use this:
- If your website has a robots.txt file, double check your robots.txt file to make sure that you do not exclude directories that you want to see in Google’s search results.
- Note that your website visitors can still see the pages that you exclude in the robots.txt file. Check your website with the website audit tool in SEOprofiler to find out if there are any issues with the robots.txt file.
2. Use the meta robots noindex tag and Google will go away
The meta robots noindex tag enables you to tell search engine robots that a particular page should not be indexed. To exclude a web page from the search results, add the following code in the <head> section of a web page:
In this case, search engines won’t index the page and they also won’t follow the links on the page. If you want search engines to follow the links on the page, use this tag:
The page won’t appear on Google’s result page then but the links will be followed. If you want to make sure that Google indexes all pages, remove this tag.
The meta robots noindex tag only influences search engine robots. Regular visitors of your website still can see the pages.
3. The wrong HTTP status code will send Google away
The server header status code enables you to send real website visitors and search engine robots to different places on your website. A web page usually has a “200 OK” status code. For example, you can use these server status codes:
- 301 moved permanently: this request and all future requests should be sent to a new URL.
- 403 forbidden: the server refuses to respond to the request.
For search engine optimization purposes, a 301 redirect should be used if you want to make sure that visitors of old pages get redirected to the new pages on your website.
4. Google won’t index password protected pages
- If you password protect your pages, only visitors who know the password will be able to view the content.
- Search engine robots won’t be able to access the pages. Password protected pages can have a negative influence on the user experience so you should thoroughly test this.
- In general, you want Google to index page pages.
6. Bad WordPress or Plugin Configurations
- Under Settings/Reading in WordPress there is a setting to block Search Engines from crawling your site. We’ve this set while developing a site and it inadvertently NOT being unchecked.
- As well, most SEO Plugins like Yoast and Ultimate all have settings to globally block a site, or to easily set no-index tags. Be sure that these settings are monitored as to not disrupt proper crawling.