Use this script to get your entire site indexed on Google in less than 48 hours. No tricks, no hacks, just a simple script and a Google API.
You can read more about the motivation behind it and how it works in this blog post https://seogets.com/blog/google-indexing-script
Important
- Indexing != Ranking. This will not help your content/page rank on Google, it'll just let Google know about the existence of all your pages.
- This script uses Google Indexing API. While there is no absolute guarantee that every page will be indexed, recent tests conducted in December 2023 have shown a notably high success rate.
- Install Node.js
- An account on Google Search Console with the verified sites you want to index
- An account on Google Cloud
- Download or clone this repository
- Follow this guide from Google. By the end of it, you should have a project on Google Cloud with the Indexing API enabled, a service account with the
Owner
permission on your sites. - Make sure you enable both
Google Search Console API
andWeb Search Indexing API
on your Google Project ➤ API Services ➤ Enabled API & Services. - Download the JSON file with the credentials of your service account and save it in the same folder as the script. The file should be named
service_account.json
- Open a terminal and navigate to the folder where you cloned the repository
- Ensure you are using an up-to-date Node.js version, with a preference for v20 or later. Check your current version with
node -v
. - Run
npm install
to install the dependencies - Run
npm run index <domain or url>
to index all the pages of your site.
- If your site is a
Domain
Property on GSC, then run it likenpm run index seogets.com
- Otherwise, if it's a
URL Prefix
property, then run it likenpm run index https://seogets.com
- When in doubt try both 😀
Here's an example of what you should expect:
Important Notes:
- Your site must have 1 or more sitemaps submitted to Google Search Console. Otherwise, the script will not be able to find the pages to index.
- You can run the script as many times as you want. It will only index the pages that are not already indexed.
- Sites with a large number of pages might take a while to index, be patient.
MIT License
This project is sponsored by SEO Gets