XML Sitemap 404 Nginx Config
- This topic is empty.
-
AuthorPosts
-
January 16, 2025 at 10:35 am #27355
Julia
GuestI have a SlickStack instance and I’m using plugin “XML Sitemap Generator for Google 4.1.21” but my /sitemap.xml is a 404 page. The plugin suggested me to add below lines to nginx config:
rewrite ^/.*-misc?\.xml$ “/index.php?xml_sitemap=params=$2” last;
rewrite ^/.*-misc?\.xml\.gz$ “/index.php?xml_sitemap=params=$2;zip=true” last;
rewrite ^/.*-misc?\.html$ “/index.php?xml_sitemap=params=$2;html=true” last;
rewrite ^/.*-misc?\.html\.gz$ “/index.php?xml_sitemap=params=$2;html=true;zip=true” last;
rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.xml$ “/index.php?xml_sitemap=params=$2” last;
rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.xml\.gz$ “/index.php?xml_sitemap=params=$2;zip=true” last;
rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.html$ “/index.php?xml_sitemap=params=$2;html=true” last;
rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.html\.gz$ “/index.php?xml_sitemap=params=$2;html=true;zip=true” last;
I’ve tried to the abode lines add on /var/www/site/production.conf in many places, restart nginx, clear all caches but no luck. Anyone knows any solution?January 16, 2025 at 12:47 pm #27358Jack
Guestthis one? https://wordpress.org/plugins/google-sitemap-generator/
I use it on several SS instances without issue
January 16, 2025 at 12:48 pm #27359Hannah
GuestI have a SlickStack instance and I’m using plugin “XML Sitemap Generator for Google 4.1.21” but my /sitemap.xml is a 404 page
Please try activating the HoverCraft theme or other basic type of theme, and disabling all other plugins, esp. SEO or framework type of bloated plugins
January 21, 2025 at 10:25 am #27395Gabriel
Guesthey OP did you get this working yet?
January 22, 2025 at 4:40 am #27411Roy
GuestStill struggling with this
January 22, 2025 at 8:22 pm #27413Bruce
GuestStill struggling with this
OP you are correct… our XML sitemap just broke too using that plugin:
https://slickstack.io/sitemap.xml
I’m thinking maybe something is broken in their plugin because it worked fine for years, perhaps a recent version update broke it… still researching.
January 23, 2025 at 11:12 am #27415Sarah
GuestOkay, I think what happened is a few months ago we were optimizing the
production
server block and changed the order of a few location matches. So that might have caused thetry_files
to get messed up for XML sitemaps!https://github.com/littlebizzy/slickstack/commit/8313ecc65313c162c6791e49237f01d3b83a3f43
This should now be fixed for both sitemaps and RSS feeds too.
Thanks for reporting, OP 😉
JAN2025HH
January 23, 2025 at 10:34 pm #27433Michelle
GuestThe trick from Sarah worked, thank you so much!
January 25, 2025 at 8:51 am #27434Marie
Guest🥳🥳🥳
-
AuthorPosts