1,723
edits
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 /> |