goenning / google-indexing-script

Script to get your site indexed on Google in less than 48 hours
https://seogets.com
MIT License
6.96k stars 483 forks source link

Remove pages not in sitemap #67

Open BillTheGoat opened 4 months ago

BillTheGoat commented 4 months ago

Is there a flag to have the script tell google to remove the pages that are indexed but not in our sitemaps? We have pages that are created and others that are pulled daily, and I would like to avoid google hitting too many 404s.

BillTheGoat commented 4 months ago

Searching the code I find no URL_DELETED, which means it is not in the project. The API requires:

Send the following HTTP POST request to https://indexing.googleapis.com/v3/urlNotifications:publish endpoint
{
  "url": "https://careers.google.com/jobs/google/technical-writer",
  "type": "URL_DELETED"
}

So this is a feature request.