How I can remove the non-existing pages URL from Google.
There are a lot of pages which doesn't exist on our website. How to remove their URL from Google.
How I can remove the non-existing pages URL from Google.
There are a lot of pages which doesn't exist on our website. How to remove their URL from Google.
If the pages are minimal, you can submit in the Google Search Console - Removal Tool found here: https://www.google.com/webmasters/tools/removals
If the pages are greater, you can submit a new sitemap to let Google update your indexed URLs and give time for them to de-index the irrelevant URLs as long as they are not found or have the 'noindex' tag.
In both of the cases, if you're not aware why lot of pages are appearing on your website that you have not created, please check the following:
410 Gone
with PHP, like:<?php
if ($_SERVER['REQUEST_URI'] == '(pattern1|pattern2)') {
header ("HTTP/1.1 410 Gone");
}
?>
On this way Google learns quickly, that these urls don't exist and de-indexes them quickly.
Another way is to fire noindex
with X-Robots-Tag, like
<?php
if ($_SERVER['REQUEST_URI'] == '(pattern1|pattern2)') {
header("X-Robots-Tag: noindex, nofollow", true);
}
?>
but the de-indexing happens (much) slower.