Sometimes things end up in Google that should never be there: a file with personal data, a staging subdomain, a long-finished promotion or spam pages left after a hack. The usual first reaction is to add a Disallow line to robots.txt, and that is the most common mistake. Removal has two parts: hiding the URL from results right now, and making sure it does not come back. Each has its own tool, and you normally use both: a fast temporary measure in Search Console and a permanent change on the server or the page itself.
Why robots.txt does not remove pages
robots.txt stops crawling, not indexing. Once a page is blocked, Google cannot fetch it and never sees a noindex tag, so the URL may linger in results as a bare address, especially if other sites link to it. During removal, keep the page crawlable so Google can see that it is gone or marked noindex.
The quick route: Removals in Search Console
Under Removals, New request offers Temporarily remove URL, which hides a URL or a whole prefix for about six months, and Clear cached URL, which clears the snippet until the page is recrawled. Requests are usually processed within a day, but they only hide results; without a permanent fix the page can reappear when the period ends. Only verified owners of the property can use the tool.
Permanent methods
Keep the page but not in search: noindex. Add <meta name="robots" content="noindex"> to the head. For PDFs and documents, send a header instead, for example in Apache:
<FilesMatch "\.(pdf|docx?)$">
Header set X-Robots-Tag "noindex"
</FilesMatch>
In Nginx, add add_header X-Robots-Tag "noindex"; to the relevant location block.
The page is gone for good: 404 or 410. Both lead to removal after recrawling; 410 states the deletion was intentional and sometimes works slightly faster.
# Apache
Redirect gone /files/oquvchilar-royxati.pdf
# Nginx
location = /files/oquvchilar-royxati.pdf {
return 410;
}
There is a replacement: 301 redirect. Google swaps the old URL for the new one and link value is preserved. For duplicates, a canonical tag may be enough.
Example: a school's file with personal data
A private school in Tashkent uploaded a PDF list of newly admitted pupils that also contained parents' phone numbers, and it started appearing when people searched for the school. The response:
- Delete the file or make its URL return 410 immediately.
- Submit a temporary removal for the URL in Removals to hide it within a day.
- Remove links to the file from the site's pages.
- If copies exist on other sites, contact their owners; Google also has dedicated request forms for personal information, so check their conditions in the Google Help Center.
If parents still need the list, publish it behind a password rather than in a public folder.
A staging subdomain got indexed
An unprotected test.misol.uz quickly gets found and duplicates the main site. Protect it with HTTP Basic Auth:
htpasswd -c /home/user/.htpasswd-test dev
AuthType Basic
AuthName "Test sayt"
AuthUserFile /home/user/.htpasswd-test
Require valid-user
Googlebot then receives 401 and the pages drop out over time. To speed things up, add the subdomain to Search Console as its own property and submit a prefix removal. When the work is done, delete the subdomain; its DNS records can be managed in the DNS section of the sayt.uz cabinet.
Checking the result
Removal requests show their status in the Removals section. To confirm the permanent fix, inspect the URL: "URL is not on Google" with noindex or 404 as the reason means you are on track. A site: search gives a rough picture, but it is incomplete and can lag behind.