Google Search Console
Details an integration available for Google Search Console, built and maintained by Umbraco HQ.
Last updated
Was this helpful?
Details an integration available for Google Search Console, built and maintained by Umbraco HQ.
Last updated
Was this helpful?
This integration provides an extension for Umbraco CMS. It provides details on indexed URLs managed in Google Search Console.
To ensure compatibility, check the Dependencies tab on NuGet for the required Umbraco CMS version. For example, see .
The package uses the OAuth2 security protocol for authentication. After the authorization process completes successfully, the access token and the refresh token will be saved into the Umbraco database.
All requests to the Google Search Console API will include the access token in the authorization header.
The easiest way to configure the integration is to make use of an application Umbraco has pre-configured with Google. With this in place, the authorization flow will go through a proxy website Umbraco maintains before redirecting back to your Umbraco backoffice.
From version 1.1.0, we introduced an alternate approach that requires a little more setup. It removes the need for relying on any services from Umbraco when using the integration.
To use this you need to setup your own app with Google and use an extended configuration like this:
The authorization mode is toggled by the UseUmbracoAuthorization
flag, which by default is set to true
meaning that previous versions are not impacted.
The used service is provided using the AuthorizationImplementationFactory
method, depending on the type of authorization selected.
The authorization controller uses the window.postMessage
interface for cross-window communications when redirecting from the Google Search Console authorization server.
The URL Inspection Tool is accessible from each content node via the URL Inspection content app.
If you haven't connected your Google account yet, you can authorize your Umbraco application by using the Connect button. This will prompt the Google authorization window and at the end of the process, you will receive the access token and the refresh token.
You can also choose to remove access to Google Search Console API by triggering the Revoke action. This will remove the access token and the refresh token from the database.
After Google has verified your ownership, the URL Inspection tool will provide the proper results. Otherwise, a "permission denied" error will be shown.
The URL Inspection Tool API expects three parameters, two mandatory:
InspectionUrl - a fully-qualified URL to inspect. It must be under the property specified in "siteUrl".
SiteUrl - the URL of the property as defined in the Search Console.
LanguageCode - optional; the default value is "en-US".
Authorization specific methods are exposed by the and implemented by two services:
If you are selecting your own authorization flow that uses the AuthorizationService
, the redirect URL will be this one: /umbraco/api/Googleauthorization/oauth
, from . Make sure to set to correct URL in the settings of the website and in the configuration of your Google app.
Before you can retrieve data from the Search Console API you need to register the domain of your Umbraco website. This is done at the .
More information can be found .