Yoast and SiteMap Index XML: Difference between revisions
m Root moved page Yoast and Site Index XML to Yoast and SiteMap Index XML without leaving a redirect |
mNo edit summary |
||
Line 7: | Line 7: | ||
So my suggestion would be to have a great big On / Off Button on the dashboard of their interface that says: "Advanced Interface: On / Off" which changes everything to smarten it up from its dumbed down display. | So my suggestion would be to have a great big On / Off Button on the dashboard of their interface that says: "Advanced Interface: On / Off" which changes everything to smarten it up from its dumbed down display. | ||
== Taking Control of Yoast == | ==Taking Control of Yoast== | ||
The first thing to know is that Yoast "creates" an XML sitemap index named "sitemap_index.xml" in the root directory of a WordPress website it is installed on. "Create" is in quotes, because it doesn't create a file, but makes it so WordPress responds when a file by that name is requested (sort of like most other WordPress requests). In addition to the sitemap_index.xml file it generates / "creates" several XYZ-sitemap.xml files for pages, posts, images, etc. (depending on the website and configuration of Yoast). | The first thing to know is that Yoast "creates" an XML sitemap index named "sitemap_index.xml" in the root directory of a WordPress website it is installed on. "Create" is in quotes, because it doesn't create a file, but makes it so WordPress responds when a file by that name is requested (sort of like most other WordPress requests). In addition to the sitemap_index.xml file it generates / "creates" several XYZ-sitemap.xml files for pages, posts, images, etc. (depending on the website and configuration of Yoast). | ||
That leaves the door open for a bit of manipulation that allows full control of Yoast. | That leaves the door open for a bit of manipulation that allows full control of Yoast. | ||
=== How? === | ===How?=== | ||
Whoever controls the Sitemap Index controls everything. IE, a new Sitemap Index can be manually created to point to all of the individual Yoast generated Sitemaps plus custom Sitemaps or ones generated by other SEO software. | Whoever controls the Sitemap Index controls everything. IE, a new Sitemap Index can be manually created to point to all of the individual Yoast generated Sitemaps plus custom Sitemaps or ones generated by other SEO software. | ||
Line 22: | Line 22: | ||
</syntaxhighlight>The above RewriteRule basically says: "Anyone that is looking for sitemap_index.xml should be redirected to SitemapIndex.xml and the browser should be given a 302 (temporarily moved) error number and that's it (the L at the end)." But it didn't work. Why? Because the sitemap_index.xml file doesn't exist. The WordPress software responds with the appropriate information when the file is requested, but that's after Apache can Rewrite something. Don't forget to make the SitemapIndex.xml file and then copy the raw Yoast XML markup code into the file as a starting point. | </syntaxhighlight>The above RewriteRule basically says: "Anyone that is looking for sitemap_index.xml should be redirected to SitemapIndex.xml and the browser should be given a 302 (temporarily moved) error number and that's it (the L at the end)." But it didn't work. Why? Because the sitemap_index.xml file doesn't exist. The WordPress software responds with the appropriate information when the file is requested, but that's after Apache can Rewrite something. Don't forget to make the SitemapIndex.xml file and then copy the raw Yoast XML markup code into the file as a starting point. | ||
Instead, just create the physical file sitemap_index.xml in the root directory of the WordPress website. My preferred solution was to use a hybrid of the two with a note inside of the sitemap_index.xml explaining what I had configured.<br /> | Instead, just create the physical file sitemap_index.xml in the root directory of the WordPress website. My preferred solution was to use a hybrid of the two with a note inside of the sitemap_index.xml explaining what I had configured. | ||
=== Sitemap Index XML File === | |||
As noted above, a good starting point is to copy the Yoast sitemap_index.xml code. More information is available from sitemaps.org (AKA Google), here: https://www.google.com/sitemaps/protocol.html | |||
Take a look at some of the pros to see what they do; | |||
* https://www.cnn.com/sitemaps/cnn/index.xml | |||
* <nowiki>https://www.microsoft.com/learning/sitemap.xml</nowiki> (not a good example in terms of readability | |||
* https://www.google.com/sitemap.xml (they're the boss) | |||
Where can you find a site's sitemap or sitemap index? Here: WhatEverURL/robots.txt | |||
<br /> |