Viewing 8 replies - 1 through 8 (of 8 total)
  • Did you try the rewrite rules mentioned in the FAQ?

    Thread Starter Draft

    (@nadlerz)

    How to implement this in nginx?
    I’m just using a shared host.
    On what file should I add the rewrites ?

    Thanks !

    I don’t know how to implement it on a shared host. This is the first time, I hear that a shared host uses nginx. There is no particular file (like .htaccess for Apache) to implement it on the fly. You could ask your host to see, if they could help.

    @nadlerz
    Which URL you have checked? /sitemap.xml OR /sitemap_index.xml ?

    In Yoast SEO plugin URL sitemap location is changed sometime back.

    Following 3 lines will take care of old sitemap link as well as new ones.

    rewrite ^/sitemap\.xml$ /sitemap_index.xml permanent;
    rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

    As you are on shared hosting try asking your support? They will do this for you.

    I’m on WP 3.4.2 & WP SEO 1.2.8.5. I’m getting the same 404 as the OP but

    a) Don’t understand where to put the rewrite rules (I’m using NginX)
    b) @rahul, I’m just using the ‘You can find your XML Sitemap here’ button in the plugin

    Also just noticed that the plugin isn’t generating a new sitemap after creating a new post

    a) Don’t understand where to put the rewrite rules (I’m using NginX)

    You can put them in server {..} block in nginx for your site.

    @rahul, I’m just using the ‘You can find your XML Sitemap here’ button in the plugin

    You also need to check if you have proper read-write permission on server. Plugin must be able to create sitemaps first. Looks like a permission issue as well.

    @cloudmaster
    by file permission I meant if u have a old sitemap.xml or sitemap_index.xml or sitemap.xml.gz present in your root dir, delete them.

    Actually, it looks like Yoast SEO plugin generates sitemaps on the fly (on multisite). If you have old sitemaps file physically present your request may not reach plugin

    popac

    (@popac)

    Solution is so simple nadlerz

    The only “problem” is that you use plugin who generate XML on the fly.

    You need to check your nginx settings
    Location on server:
    (/etc/nginx/ and /etc/nginx/conf.d)
    (you can use WINSCP software for navigation)

    open nginx.conf (if there’s your

    server {.....}

    part for websites or go to conf.d folder and open vhost.conf

    then find something like:

    location ~* "\.(js|ico|gif|jpg|png|css|html|htm|xml |swf|htc|bmp|cur)$" {

    or where you noticed that stands “xml” and simple delete this

    location ~* "\.(js|ico|gif|jpg|png|css|html|htm|swf|htc|bmp|cur)$" {

    After that you need to restart nginx with commands

    nginx – stop
    nginx

    I hope that this guide help you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] No sitemap generated under nginx server ?’ is closed to new replies.