When registering for the Google Search Console, you will be asked to choose one first.
It says "domain" and "URL prefix". I explained how to register the "domain" on the left side in the past, so this time I will explain how to register the "URL prefix" on the right side.
Click here for how to set up a domain
What is written on this page
What is a prefix property?
"Prefix" is a word that refers to a prefix, and only the specified prefix is measured in this URL prefix property.
For example, if you register at "https://abc.com" this time,
The https protocol is "https://abc.com"
Is included in the measurement target,
http protocol "http://abc.com"
www and other subdomains "https://www.abc.com/ and https://sub.abc.com"
Is not subject to measurement.
Confirmation of ownership
The next step is to enter the prefix you want to measure.
Then the following screen will appear. You will need to confirm ownership of the site.
By the way, if you can confirm with any of the authentication methods described below, a green screen like the image will be displayed.
If you see this screen, you are successful.
(* The image is a DNS authentication success screen.)
This is the method shown at the top, which is also recommended by Google.
It is a method to confirm the ownership by downloading the displayed file and uploading it to the server of the site you want to measure.
Upload to the server of the corresponding URL using an FTP tool or the like.
Then go back to the search console and click "Confirm".
If the upload is successful, the message "Ownership confirmed" will be displayed.
Please note that even if the site is successfully confirmed, please do not change the contents or name of the uploaded file.
Also, do not delete the file.
If you take the above measures, the site will return to the unconfirmed state again.
This is the second confirmation method.
Copy this code that starts with meta name… and embed it in the top page of the site using an HTML editor or the like.
There is no problem with the embedding position anywhere in the head tag.
From the dashboard of the management screen, go to "Appearance" ▶ ︎ "Edit theme" ▶ ︎ "Theme header (header.php)" at the bottom right.
Paste the code you copied earlier before the end tag of the head.
This is a convenient authentication method when the site you want to register this time is already using Google analytics.
Click the "Confirm" button to automatically start authentication.
Google tag manager
This is the same as the previous analytics, and it is a convenient authentication method if you are already using Google Tag Manager.
The correspondence is the same, let's press the confirmation button.
Domain name provider (DNS record)
This is a method to confirm by copying the specified text record to the DNS settings of the server.
By the way, please refer to the domain property article for details on how to set this.
Should I choose the domain property or the URL prefix property?
It depends on the application, so it is difficult to decide which is the correct answer or the better one.
For those who are not very familiar with it and want to touch the search console for the time being,domainI think you can select.
However, selecting Domain has the disadvantage that you cannot add data to your analytics.
Therefore, it is better to first register in the domain and then additionally register in the prefix as needed.
Later, you can learn analytics and feel safe if you want to aggregate and verify the data together with the search console.
At first, the "URL prefix" and "domain" are difficult to understand, but I think that by making good use of both property types, the range of aggregation and verification can be expanded.
If you have any questions after reading the article, feel free to Twitter (@kaznak_com) Etc., please ask.
Please excuse me.