Search Console URL removals
Submit temporary removals on the signed-in Removals page for a property the user owns. There is no bulk removals endpoint to call from the page. Drive the New Request dialog, and cancel anything whose confirmation does not match the requested mode.
A successful removal lasts about six months. It does not stop crawling. Permanent removal still needs a live 404, 410, or noindex on that URL.
When to use
Use this when the user has a verified Search Console property and a list of their own URLs to hide temporarily.
Do not use it for a property the user does not control. Do not remove an entire host, or a prefix that still contains live pages, unless the user names that exact prefix and confirms it.
Input
Expect a CSV with URL and Removal mode.
Remove all URLs with this prefixbecomesprefixRemove this URL onlybecomesexact
Before submitting, collect two lists from the user:
deny: prefixes that must not be removed, including live trees that share a path with retired URLsallowHosts: hosts the user explicitly agreed to remove entirely. Leave this empty unless they did
Skip removals already active in the Removals table. An exact removal of a host root is not the same request as a prefix of that host. Do not submit the prefix unless the user asked for it, and do not submit it when the confirmation is not a prefix confirmation.
Run
- Open
https://search.google.com/search-console/removals?resource_id=plus the property id, on a browser profile that is already signed in as an owner. - Stay on that tab. Do not follow other Search Console navigation while a run is in progress.
- Set
window.__GSC_QUEUEto{ url, mode }objects,window.__GSC_DENYto the deny list, andwindow.__GSC_ALLOW_HOSTSto the allow list. - Inject scripts/submit-removals.js. If the injection channel is small, assign the queue in chunks, then eval the script.
- Leave the tab open until
window.__gscState.finishedis true. The overlay Stop button setswindow.__gscStop.
Search Console requires TrustedHTML. Do not assign innerHTML. Build any status UI with createElement and textContent.
If JavaScript from outside the page is refused, turn on View > Developer > Allow JavaScript from Apple Events, or paste the script in DevTools on that tab. The script only works while that Removals document is open.
Dialog rules
The request dialog is the visible .g3VIld[role=dialog]. Other role=dialog nodes on the page are tooltips and the navigation drawer.
- Click the
[role=button]whose text isNEW REQUEST,NEXT,SUBMIT REQUEST, orCANCEL. - Set the URL with the native
HTMLInputElementvalue setter, then dispatchinputandchange. Writing.valuealone leaves Next disabled. - The mode control is
[role=radio]with empty text. Click its parent, whose text isRemove this URL onlyorRemove all URLs with this prefix. - Submit only when the confirmation contains the exact URL. Prefix mode must also contain
Remove all URLs with this prefix?. Exact mode must not. - If the confirmation does not match, click Cancel and record a failure. A host-root prefix often confirms as a single URL. Do not submit that as if it were a prefix.
- Do not click Cancel while the dialog says
Submitting request. Wait for it to close. - Text that says the URL is already removed counts as done, not as a new failure.
Resume
Progress is stored in localStorage under a key derived from the property id. A later run skips entries that are not failures. Clear that key only when the user wants a clean run.
Stop after six consecutive failures. Report submitted, skipped, and failed counts, plus the failed URLs and the dialog text. Do not invent a quota. If requests start failing, stop and show the error.