Using with Yoast sitemaps (and 301 redirections)
-
I’m seeing if I can get Simply Static to include Yoast sitemaps in the output.
It’s not too hard to get it started – I’ve added the following to ‘Additional URLs’:
https://example.com/sitemap.xml
https://example.com/sitemap_index.xml
https://example.com/post-sitemap.xml
https://example.com/page-sitemap.xml
https://example.com/category-sitemap.xml
https://example.com/post_tag-sitemap.xml
https://example.com/author-sitemap.xmlBut unfortunately,
sitemap.xml
is a 301 redirect tositemap_index.xml
. When visiting it on the static site, it ends up as a plain XML file with this HTML in it:<!DOCTYPE html> <html> <head> <title>Redirecting...</title> <meta http-equiv="refresh" content="0;url=/sitemap_index.xml"> </head> <body> <script type="text/javascript"> window.location = "/sitemap_index.xml"; </script> <p>You are being redirected to <a href="/sitemap_index.xml">/sitemap_index.xml</a></p> </body> </html>
This isn’t really the fault of Simply Static, but I’m wondering if anyone has come across this and thought of a simple solution.
I may need to just manually run a script after generation to remove the file and instead put a manual 301 redirect in on my host (AWS S3)…. but I’m keen for other ideas!
- The topic ‘Using with Yoast sitemaps (and 301 redirections)’ is closed to new replies.