SmartCrawl Pro sitemap 404

My sitemap URL is returning 404, I believe it is a rewrite for Nginx but I already tried

location ~ ([^/]*)sitemap(.*).x(m|s)l$ {
rewrite ^/sitemap.xml$ /wp-content/uploads/sitemap.xml permanent;
}

rewrite ^/(.*/)?sitemap.xml /wp-content/uploads/sitemap.xml last;

But no luck, can you help me?

  • Katya Tsihotska
    • Support & QA

    Hi Simon

    Hope you're doing well!

    There is a chance that there are rules in your nginx conf file those are interfering and causing the issue. Would you mind please share the entire content of the nginx.conf file of your site? You can directly post it or copy it to a .txt file and attach to your next reply.

    Kind regards,
    Katya

  • Simon
    • New Recruit
    user www-data;
    worker_processes auto;
    pid /run/nginx.pid;
    
    events {
    	worker_connections 768;
    	# multi_accept on;
    }
    
    http {
    
    server {
    	location ~* \.(txt|xml|js)$ {
        expires 8d;
    	}
    
    	rewrite ^/(.*/)?sitemap.xml /wp-content/uploads/sitemap.xml last;	
    
    location ~* \.(css)$ {
        expires 8d;
    }
    
    location ~* \.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$ {
        expires 8d;
    }
    
    location ~* \.(jpg|jpeg|png|gif|swf|webp)$ {
        expires 8d;
    }
    
    }
    
    	##
    	# Basic Settings
    	##
    
    	sendfile on;
    	tcp_nopush on;
    	tcp_nodelay on;
    	keepalive_timeout 65;
    	types_hash_max_size 2048;
    	# server_tokens off;
    	client_max_body_size 100M;
    
    	 server_names_hash_bucket_size 64;
    	# server_name_in_redirect off;
    
    	include /etc/nginx/mime.types;
    	default_type application/octet-stream;
    
    	##
    	# SSL Settings
    	##
    
    	ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    	ssl_prefer_server_ciphers on;
    
    	##
    	# Logging Settings
    	##
    
    	access_log /var/log/nginx/access.log;
    	error_log /var/log/nginx/error.log;
    
    	##
    	# Gzip Settings
    	##
    
    # Enable Gzip compression
    gzip          on;
    
    # Compression level (1-9)
    gzip_comp_level     5;
    
    # Don't compress anything under 256 bytes
    gzip_min_length     256;
    
    # Compress output of these MIME-types
    gzip_types
        application/atom+xml
        application/javascript
        application/json
        application/rss+xml
        application/vnd.ms-fontobject
        application/x-font-ttf
        application/x-font-opentype
        application/x-font-truetype
        application/x-javascript
        application/x-web-app-manifest+json
        application/xhtml+xml
        application/xml
        font/eot
        font/opentype
        font/otf
        image/svg+xml
        image/x-icon
        image/vnd.microsoft.icon
        text/css
        text/plain
        text/javascript
        text/x-component;
    
    # Disable gzip for bad browsers
    gzip_disable  "MSIE [1-6]\.(?!.*SV1)";
    
    	##
    	# Virtual Host Configs
    	##
    
    	include /etc/nginx/conf.d/*.conf;
    	include /etc/nginx/sites-enabled/*;
    }
    
    #mail {
    #	# See sample authentication script at:
    #	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
    #
    #	# auth_http localhost/auth.php;
    #	# pop3_capabilities "TOP" "USER";
    #	# imap_capabilities "IMAP4rev1" "UIDPLUS";
    #
    #	server {
    #		client_max_body_size 20M;
    #		listen     localhost:110;
    #		protocol   pop3;
    #		proxy      on;
    #	}
    #
    #	server {
    #		listen     localhost:143;
    #		protocol   imap;
    #		proxy      on;
    #	}
    #}
  • Ash
    • WordPress Hacker

    Hello Simon

    You don't need rewrite rule to server the sitemap, in stead we have a function which intercepts every call, looks at the URL and outputs the sitemap.

    Would you please check if you have sitemap.xml file in "/wp-content/uploads/"?

    I think the file is not there. Please let us know about that.

    Have a nice day!

    Cheers,
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.