How to Configure Magento 2 Google Indexing API Extension?

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.  

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.

Indexing Delay

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.

google indexing api general settings magento

Credentials

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.

google indexing api credentials

Once you retrieve the private API keys, upload them in this section and click Save.

Automatic Indexing

Here, you can Enable the automatic Google Indexing requests and select Page Types eligible for it. 

enable automatic google indexing magento

Note: don't forget to set the indexing delay (described above) so you don't save multiple unnecessary requests with automatic indexing.

 Additionally, you can choose the product attributes you want to trigger automatic indexing requests on. Once you change any of the selected product attributes, a page will be sent for indexing.

index magento pages on product attribute change

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. 

google indexing schedule log magento

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. 

request google indexing in magento

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

send urls for indexing magento 2

If you have a file will all URLs you want to send or delete from indexing you can upload a .txt file containing them.

upload txt file magento

Bulk Product Indexing Requests

It's common knowledge that products get updated the most often. So to simplify the process, we've added the indexing option to the mass actions. You can simply tick all products you want to send for indexing and choose a corresponding option from the mass actions.

request google indexing for magento products

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. 

magento google indexing schedule log

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.