WP 5.5 core sitemaps not working in nginx

Try add the following to site.conf.hbs (before the WordPress config segment):

location ~* /[wp\-]*sitemap.*\.xml {
    try_files $uri $uri/ /index.php$is_args$args;
    # return 200 "Match found \n";
    allow all;
    log_not_found off;
    access_log off;
}

location = /robots.txt {
    try_files $uri $uri/ /index.php$is_args$args;
    allow all;
    log_not_found off;
    access_log off;
}

Source:

1 Like