π Supercharge Your Website Indexing with This Powerful n8n Workflow! π
Google page indexing too slow? Tired of manually clicking through each page in the Google Search Console? π΄ Say goodbye to that tedious process and hello to automation with this n8n workflow! π
NB: this workflow was tested with sitemap.xml generated by Ghost CMS and WordPress.
Reach out to Eduard if you need help adapting this workflow to your specific use-case!
βοΈ How this automation works
- π
The workflow runs on a schedule or when you click "Test workflow".
- π It fetches the website's primary sitemap.xml and extracts all the content-specific sitemaps (this is a typical structure of the sitemap).
- π Each content-specific sitemap is then parsed to retrieve the individual page data.
- π The extracted page data is converted to JSON format for easy manipulation.
- ποΈ The
lastmod
(last modified date) and loc
(page URL) fields are assigned to each page entry to ensure compliance with the Sitemap protocol.
- π The page entries are sorted by the
lastmod
field in descending order (newest to oldest).
- π The workflow then loops over each page entry and performs the following steps:
- π Checks the URL metadata in the Google Indexing API.
- β
If the page is new or has been updated since the last indexing request, it sends a request to the Google Indexing API to update the URL.
- β³ Wait a sec and move on with the next page.
π Benefits
- β° Save time by automating the indexing process.
- π― Ensure all your website pages are consistently indexed by Google.
- π Improve your website's visibility and search engine rankings.
- π οΈ Customize the workflow to fit your specific CMS and requirements.
π§ Getting started
To start using this powerful n8n workflow, follow these steps:
- βοΈ Make sure to verify the website ownership in the Google Search Console.
- π¨βπ» Import the workflow JSON into your n8n instance.
- Edit the
Get sitemap.xml
node and update the URL with your website's valid sitemap.xml
- π Set up the necessary credentials for the Google Indexing API.
- ποΈ Adjust the schedule trigger to run the workflow at your desired frequency.
- π Sit back and let the workflow handle the indexing process for you!
Ready to take your website indexing to the next level? π Try this workflow now and see the difference it makes! π
β οΈ IMPORTANT NOTE 1
Need help with connecting Google Cloud Platform to n8n? Check out our article on connecting Google Sheets to n8n. The process is mainly the same. When activating Google APIs, make sure to add Web Search Indexing API
. Also, in the credential page of n8n, add the https://www.googleapis.com/auth/indexing
scope:
Check out Yulia's page for more n8n workflows!
β οΈ IMPORTANT NOTE 2
Free Google Cloud Platform account allows (re)indexing only 200 pages per day. If your website has more, then the workflow will automatically fail on quota limit β. Next day it will skip the previously added items and continue with remaining pages.
Example: Assuming you have a free Google account, 500 pages on your website and they don't change for 3 days:
- On the first day 200 pages will be added for indexing and the workflow will fail due to quota limits.
- On the second day, the workflow will check 200 pages again and skip them (because the date of re-indexing is later then the page last modified date). The next 200 pages will be added to indexing. Workflow will fail again due to quota limits.
- On the third day 400 pages will be checked and skipped, the last 100 pages will be added for indexing and the workflow finishes successfully.