Using Root Relative With Yoast Sitemaps
-
WordPress Version: 3.5.2
Yoast Version: 1.4.13
Root Relative URLs Version: 2.3Hi,
I’m using Root Relative for my site, http://www.shopp.ly. Mostly for staging purposes (I have a separate staging site, a script on AWS that hits the staging site looking for changes and pushes those changes to CloudFront). Anyway, no real problems with it and happy with the plugin except one nagging issue…
I can’t seem to get absolute URLs in the XML sitemaps generated by the Yoast WordPress SEO plugin. I understand that Google’s inability to read these URLs is their problem, not this plugin’s and I’ve read other posts here about this issue, but I can’t seem to get any of the fixes to work.
You can see the sitemap here: http://www.shopp.ly/sitemap_index.xml
I’ve tried a few things. I’ve tried adding the following to the blacklist under Settings>General:
/sitemap_index.xml
/post-sitemap.xml
/page-sitemap.xml
/category-sitemap.xml
/author-sitemap.xmlThat didn’t seem to do anything, so I tried adding:
http://www.shopp.ly/sitemap_index.xml
http://www.shopp.ly/post-sitemap.xml
http://www.shopp.ly/page-sitemap.xml
http://www.shopp.ly/category-sitemap.xml
http://www.shopp.ly/author-sitemap.xmlThat didn’t seem to do anything either.
I tried another possible fix that I read here: http://ww.wp.xz.cn/support/topic/xml-sitemaps-issue-with-root-relative-urls-plugin?replies=1
I added the following code to line 556 of the file class-sitemaps.php AND tried replacing the block of text starting on 556. Neither seemed to do anything.
if (strpos($url['loc'], "http") === 0 ) { $output .= "\t\t<loc>" . $url['loc'] . "</loc>\n"; } else { $output .= "\t\t<loc>http://" . $_SERVER['HTTP_HOST'] . $url['loc'] . "</loc>\n"; }But I’m not a developer, so I don’t know what this would actually do.
Anyone have any idea how I can get this working?
The topic ‘Using Root Relative With Yoast Sitemaps’ is closed to new replies.