Difference between revisions of "Google Notes"
m |
m |
||
Line 39: | Line 39: | ||
===How to add a URL-prefix property=== | ===How to add a URL-prefix property=== | ||
== User-declared canonical == | ==User-declared canonical== | ||
<br /> | Google (and one can assume other Search Engines) wants an authortative / single ULR (AKA link) defined for every 'page' of content on the internet. There can be several URLs that 'link' / connect to a single page of content. We as humans don't really care, but remember, there's a human perspective and a 'robot' perspective, this is all about the 'search bots'. | ||
In broad internet terms it is referred to as a [[wikipedia:Canonical_link_element|Canonical Link Element]]. In the Google Search Console, it is referred to as: User-declared canonical AND Google-selected canonical. | |||
As it appears in a real life web page;<syntaxhighlight lang="text"> | |||
<link rel="canonical" href="https://wiki.terrabase.info/wiki/Main_Page"/> | |||
</syntaxhighlight>How to include that above item if one isn't hand coding the HTML? | |||
For MediaWiki; | |||
* In the LocalSettings.php File, add these to lines (from https://www.mediawiki.org/wiki/Manual:$wgCanonicalServer<nowiki/>and https://www.mediawiki.org/wiki/Manual:$wgEnableCanonicalServerLink) | |||
** $wgCanonicalServer = '<nowiki>https://WhatEverDomainName'</nowiki>; (http can be used in place of https, but Google doesn't like that) | |||
** $wgEnableCanonicalServerLink = "true";<br /> |
Revision as of 08:12, 14 October 2021
Google Search Console
https://search.google.com/search-console
Adding a "Property"
- Top left, under Google Search Console, Current "Propertly" Dropdown Menu
- Add Property (select the proper type)
- More Information from Google: Add a website property - Search Console Help (google.com)
Inspecting a URL
- Very top of page, enter a Full URL
Notice there is a "Google Index" and a "Live Test" Sub-Tab
Google Analytics
Starting Point: https://marketingplatform.google.com/about/analytics/(see link at the top right of the page to sign in)
Adding a URL-prefix property
It shouldn't be this difficult, but thank you Google, it is.
URL-prefix property VS Domain Property
- URL-prefix property = https://wiki.terrabase.info
- Domain Property = *://*.terrabase.info (where * = WildCard / Anything, IE http://www.terrabase.info, https://WhatEver.terrabase.info, https://terrabase.info
- ...from: Add a website property - Search Console Help (google.com)
Why does this matter? Well, when it comes to checking a robots.txt file with the Google Search Console (which by the way has no easy way or any link what so ever to find the "Robots.txt Tool", unless you have the explicit link), it only checks URL-prefix properties, not Domain Properties.
Robots.txt Tester
From Google (Test your robots.txt with the robots.txt Tester - Search Console Help (google.com)): The tool works only with URL-prefix properties; it does not work with Domain properties.
OK, where is the ROBOTS.txt Tester? Is there a link available from the Google Seach Console? Hell no! Here's the explicit link:
Now the next question is how to add a URL-prefix property...
How to add a URL-prefix property
User-declared canonical
Google (and one can assume other Search Engines) wants an authortative / single ULR (AKA link) defined for every 'page' of content on the internet. There can be several URLs that 'link' / connect to a single page of content. We as humans don't really care, but remember, there's a human perspective and a 'robot' perspective, this is all about the 'search bots'.
In broad internet terms it is referred to as a Canonical Link Element. In the Google Search Console, it is referred to as: User-declared canonical AND Google-selected canonical.
As it appears in a real life web page;
<link rel="canonical" href="https://wiki.terrabase.info/wiki/Main_Page"/>
How to include that above item if one isn't hand coding the HTML?
For MediaWiki;
- In the LocalSettings.php File, add these to lines (from https://www.mediawiki.org/wiki/Manual:$wgCanonicalServerand https://www.mediawiki.org/wiki/Manual:$wgEnableCanonicalServerLink)
- $wgCanonicalServer = 'https://WhatEverDomainName'; (http can be used in place of https, but Google doesn't like that)
- $wgEnableCanonicalServerLink = "true";