Delete the page and do not redirect it When the content is no longer relevant to your visitors, deleting the page is the most effective solution. Most CMSs will then display a 404 or 410 error. When Google encounters a 404 error, the page is usually removed from the index within a few weeks. Itโs often thought that a 404 error is harmful, but thatโs not the case. If there simply isnโt a relevant URL to redirect to, you should display a 404 error. If you do set up a redirect, Google will treat that as a soft 404 error.
Add a noindex tag Adding a noindex tag is the most effective way to remove URLs from the index and keep them out of the index. Search engines respect noindex tags and usually process the change within a few weeks. The noindex tag must be placed in the meta robots tag within your pageโs and tells search engines that the page must literally be โunindexable.โ
Add "disallow" to robots.txt The robots.txt file contains guidelines for crawlers, including instructions on which URL paths on your website should not be crawled. Do you have entire groups of pages that you want to remove from the index? If so, the robots.txt file is an effective way to do this. The downside of using โdisallowโ directives in your robots.txt file is that search engines ignore them when there are conflicting signals. Therefore, this is not the most effective or reliable solution for removing URLs from the index. The robots.txt file is, however, a good way to prevent search engines from crawling URL paths and, as a result, potentially indexing them. So it is primarily a way to prevent indexing.
Using the URL Removal Tool Do you want to quickly remove a URL or a group of URLs from the index? If so, you can use the URL Removal tool in Google Search Console. With this tool, you can request the temporary removal of a single URL or a group of URLs: Google will then remove the URLs from the index for about 6 months. Do you want to keep the URL out of the index after that? If so, itโs important to add a noindex tag in the meantime. The URL Removal Tool is an effective way to remove a URL from the index in a very short amount of time.
Add the X-Robots-Tag HTTP header An X-Robots-Tag HTTP header is the same as a meta robots noindex tag. However, this X-Robots-Tag HTTP header is added at the server level and can be used for both HTML pages and files. That is why this is an effective way to, for example, remove a PDF file from Googleโs index. In practice, the X-Robots-Tag HTTP header is also used when it is not feasible to modify meta robots tags.