SEO (with tips for MediaWiki and WordPress): Difference between revisions
m →Basics |
mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 53: | Line 53: | ||
* | * | ||
=== Robots === | ===Robots=== | ||
For a simple site, there aren't many restrictions that need to be put in place from a technical perspective. To see what the "Big Boys" do with their robots.txt file, just go to their site and view the file (https://www.Microsoft.com/robots.txt). | For a simple site, there aren't many restrictions that need to be put in place from a technical perspective. To see what the "Big Boys" do with their robots.txt file, just go to their site and view the file (https://www.Microsoft.com/robots.txt). | ||
Line 84: | Line 84: | ||
Using the "[[mediawikiwiki:Help:Magic_words|Magic Word]]" PageName along with the $wgSiteName Variable (in LocalSettings.php), one can keep the automatically generated Title Name and add to it;<syntaxhighlight lang="text"> | Using the "[[mediawikiwiki:Help:Magic_words|Magic Word]]" PageName along with the $wgSiteName Variable (in LocalSettings.php), one can keep the automatically generated Title Name and add to it;<syntaxhighlight lang="text"> | ||
<seo title="{{PAGENAME}} - WhatEverAddtionalText" metakeywords="WhatEverKeyWords,AnotherKeyWord,Etc." metadescription="WhatEverDescription,AnotherDescription,Etc." /> | <seo title="{{PAGENAME}} - WhatEverAddtionalText" metakeywords="WhatEverKeyWords,AnotherKeyWord,Etc." metadescription="WhatEverDescription,AnotherDescription,Etc." /> | ||
</syntaxhighlight>Tried | </syntaxhighlight>Tried additional Meta Attributes (see [https://www.w3schools.com/tags/tag_meta.asp W3schools] for more) and none of them worked. Even tried it without "meta" prepending the actual attribute name. google-site-verification is another item that does work. WikiSEO is a more advanced extension that does a bunch more. This one can add a description, which is useful as MediaWiki doesn't include a description by default, and Google (and others) tend to use the description over contents, so it gives one the option to customize a Description META Tag. | ||
Not so much for SEO, but nice as it is displayed on every page is the "Tag Line" (Example on the Wikipedia Site:From Wikipedia, the free encyclopedia) is the "Special Page", MediaWiki:Tagline (by default contains: "From <nowiki>{{SiteName}}</nowiki>", SiteName being a "Magic Word" for the name of the website) can be edited to anything (although "Create Source" must be selected first before it can be edited). | Not so much for SEO, but nice as it is displayed on every page is the "Tag Line" (Example on the Wikipedia Site:From Wikipedia, the free encyclopedia) is the "Special Page", MediaWiki:Tagline (by default contains: "From <nowiki>{{SiteName}}</nowiki>", SiteName being a "Magic Word" for the name of the website) can be edited to anything (although "Create Source" must be selected first before it can be edited). | ||
Line 102: | Line 102: | ||
</syntaxhighlight>This script is run to generate a new XML SiteMap (Google differentiates between a site map for human reading VS machine reading);<syntaxhighlight lang="text"> | </syntaxhighlight>This script is run to generate a new XML SiteMap (Google differentiates between a site map for human reading VS machine reading);<syntaxhighlight lang="text"> | ||
php /var/www/html/Wiki.TerraBase.info/maintenance/generateSitemap.php --server=https://wiki.terrabase.info --fspath=/var/www/html/Wiki.TerraBase.info/sitemap --urlpath= | php /var/www/html/Wiki.TerraBase.info/maintenance/generateSitemap.php --server=https://wiki.terrabase.info --fspath=/var/www/html/Wiki.TerraBase.info/sitemap --urlpath=sitemap --identifier=Wiki.TerraBase.info --compress=no --skip-redirects | ||
</syntaxhighlight>There's no way to name the file (sitemap.xml) as it auto generates the name (sitemap-WhatEverWebSiteName-NS_0-0.xml, followed by others, but "index" file is the important one) | </syntaxhighlight>There's no way to name the file (sitemap.xml) as it auto generates the name (sitemap-WhatEverWebSiteName-NS_0-0.xml, followed by others, but "index" file is the important one) | ||
It can be run manually start or run by a Systemd Timer or a Cron job (see Other Thoughts for creating a System Timer on CentOS 7 or 8) | It can be run manually start or run by a Systemd Timer or a Cron job (see Other Thoughts for creating a System Timer on CentOS 7 or 8) | ||
In the Google Search Console a SiteMap can be deleted if selected, then using the ... at the upper right to delete. Also, several individuals have noted that the interface shows a "Couldn't fetch" error message, but usually means "pending" (just click around and come back and it should show success). | |||
AutoSitemap Extension; | AutoSitemap Extension; | ||
Line 172: | Line 174: | ||
WPMUDEV Plugins (various) | WPMUDEV Plugins (various) | ||
Google Sitemap XML does get along with Yoast. Sort of. Instead of using the sitemap_index.xml, it uses the sitemap.xml file name | |||
WP Sitemap Page generates a human readable sitemap if one puts shortcode on each page to be "sitemaped". Note, this is not for search engines. | |||
Other SiteMap plugins focus on very specific search engines, like google news. (XML Sitemap and Google News) | |||
Yoast doesn't like to "share" the sitemap_index.xml URL file name, but apache rewrite could change it, then the individual yoast generated sitemaps could be used with a static sitemap_index.xml OR, better yet, just notify Google and define in the Robots.txt file a different index name. But if the latter choice is taken, then the automatic notification (AKA ping) of google by Yoast would need to be modified. So why not keep Yoast "stock" and modify at the Apache level? And with a quick bit of experimenting, just discovered that a physical file in the root index will override anything generated by WordPress. Copy the MediaWikiFormat or follow these instructions: https://www.google.com/sitemaps/protocol.html | |||
Taxonomy: In wordpress taxonomy is a blanket term that includes Categories and Tags (a "sub category", equivalent to Keywords). These items are used in internal wordpress searches. | |||
<br /> | <br /> |