Sitemap.xml not working


#1

hello,

i have set my site https://xyz.com/ with easy engine.

now google xml plugin is not working and it ask me to add codes and i am not able to figure out where to add this code.

*/ Since you are using Nginx as your web-server, please configure the following rewrite rules in case you get 404 Not Found errors for your sitemap:

rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?.xml$ “/index.php?xml_sitemap=params=$2” last;

rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?.xml.gz$ “/index.php?xml_sitemap=params=$2;zip=true” last;

rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?.html$ “/index.php?xml_sitemap=params=$2;html=true” last;

rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?.html.gz$ “/index.php?xml_sitemap=params=$2;html=true;zip=true” last; /*

above are the message showing in my WP.

pl. help me to solve this issue.

P.S. i am using SSL from lets encrypt


#2

I noticed that redirect rules for Yoast SEO Plugin (which includes sitemaps) were already built in to the configuration that easyengine created. I switched from google xml sitemap plugin to Yoast and it worked seamlessly.

I did get google xml sitemaps working by adding the rules to the bottom of the server {} block


#3

@impatil Standard ee setup will do an: include /var/www/yoursite.com/conf/nginx/*.conf;

So if you create a file there ending in .conf (e.g. sitemaprules.conf) and put your rules in it then they will automatically get included.

@AntoniosHadji Just for info - there is an open issue report for this.


#4