Once you configure the Magento XML sitemap, you might wonder whether you need indexing API too. The answer is Yes if you want more control over what gets indexed and when. But where do you start?
You can delve into the technical part and spend hours starting the implementation or configure the Magento 2 Google Indexing API extension.
Today, we'll talk about the latter since it is way easier to use the indexing API in Magento this way.
Post Contents [hide]
Once you install the Magento Google Indexing API module, navigate to Stores > Configuration > Magefan Extensions > Google Indexing. Then, enable the extension and continue with the other settings.
If you decide to send Google indexing requests automatically or manually, note that they are sent immediately.
However, what if you decide to promptly change something else on the page and something else after that? It will create too many unnecessary requests to Google.
To avoid this, set the Indexing Delay (in minutes) to delay the request, manual or automatic.
To send indexing requests to Google via API, you must register your application and have access to API first. You need to create a project and service account in Google Cloud.
Check out a detailed step-by-step guide on how to do that and set up Google Indexing API for Magento.
Once you retrieve the private API keys, upload them in this section and click Save.
Here, you can Enable the automatic Google Indexing requests and select Page Types eligible for it.
Note: don't forget to set the indexing delay (described above) so you don't save multiple unnecessary requests with automatic indexing.
Indexing Schedule Log Lifetime
Each indexing request you trigger is stored in the Schedule Log. To save space and remove old requests, you can set the Indexing Schedule Log Lifetime (in days). The logs will be cleared after a specified period.
Don't forget to Save the settings once you finish.
Manage Google Indexing Requests
After establishing the Google Cloud connection, you can move to the indexing requests. The Google Indexing API Extension allows you to request indexing from each page or in bulk, and monitor the submitted requests.
Let's review each in more detail.
Send Indexing Requests
To request indexing for individual pages, go to any Magento page and find the Request Google Indexing button at the top panel. Simply click on it, and the extension will send the indexing request to Google.
Bulk Indexing Requests
If you want to send multiple URLs for indexing, go to Marketing > Google Indexing > Request Indexing. Then, paste your URLs, choose a corresponding option from the Actions select box and click Submit.
Monitor Indexing Requests
Each request you send, either individual or batch, is stored in the logs. Find them under Marketing > Google Indexing > Schedule Log. Here, you can find all created, scheduled and executed requests.
Besides, you can find a certain URL, see the request status and find error messages if there are any. And finally, you can execute the request again, directly from this grid.
Making your pages indexed faster is a leverage which puts you higher than your competition. With the Indexing API, you don't have to wait for Google to discover your pages the "usual" way.
Nonetheless, you still need to use the XML sitemap and Google Indexing API for ultimate results.