Support » Plugin: The SEO Framework » Sitemap not working

  • Hello,

    I have the ‘Output Sitemap?’ option enabled, and I can see “The sitemap can be found here” below it, pointing to https://hqraja.com/sitemap.xml

    However, upon clicking that link, I am automatically redirected to https://hqraja.com/sitemap_index.xml which doesn’t exist, and thus the result is a 404.

    I don’t have any other plugins currently installed that may mess with sitemaps. Also, I’m on Nginx so there’s no .htaccess file that could be causing a redirect issue. Please help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello Haroon,

    Normally, the sitemap should be automatically be configured.
    However, on some nginx setups issues can occur with WordPress and special rules.

    sitemap_index.xml is used by Yoast SEO, and as well on some sitemap plugins. Your scenario leads to seemingly left-over manual configuration for these plugins.

    If you have access to the nginx configuration file (nginx.conf), either both or one of these lines should be present:

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

    You should remove those lines.

    Then, you should add the following line:

    rewrite ^/sitemap\.xml$ /index.php?the_seo_framework_sitemap=xml last;
    

    If you do not have access to the configuration, please contact your hosting provider whilst providing these details.

    Do let me know if this helps 🙂 Have a great weekend!

    • This reply was modified 2 years, 5 months ago by  Sybre Waaijer.

    Thanks a lot, Sybre.

    Your solution seems to be what I’m looking for, though I have ended up going with another plugin for sitemap generation instead, because it seems to offer some more options that I’ll find useful down the line (such as news sitemaps that’ll come in handy once I start posting news frequently). It also required me to make some similar changes to the nginx configuration.

    Love the SEO features of your plugin though, and the interface is just perfect! I only wish it offered more customization when it comes to Open Graph and Schema markup etc. That’s the only reason I’m having to use another plugin, despite not liking its interface, excessive branding and ads.

    Hoping to see improvements in that department, so that I could switch to this one.

    Plugin Author Sybre Waaijer

    (@cybr)

    Anytime Haroon!

    I totally understand.

    I just finished a new framework which will go in beta next week, the expected release date will be somewhere around New Years Eve.
    When that all works and goes live, more Schema.org and other settings will come in rapid pace through that framework :).

    If you’re interested, the new plugin with that framework is already available on GitHub.

    Cheers!

    That’s awesome to hear! TBH I’d ditch every other SEO plugin out there for this one for the UI alone (it’s just absolute perfection), if I’d get all the SMO options I need.

    On the subject, there’s a separate SMO plugin (rather uncreatively) named Facebook Open Graph, Google+ and Twitter Card Tags which has a very similar UI; I thought of going with it while keeping this one for SEO, but the two didn’t integrate, unfortunately. That one wouldn’t get the SEO titles and descriptions set by this one, and was also missing certain elements of fine-grained control over specifying content type for individual pages and sections, rather than being forced to use just general site-wide options.

    I’m not sure how it’d integrate with your framework, but it could perhaps be worth looking into to see if you and that plugin’s author could collaborate to support integration between the two as well. Just like yours is the SEO plugin with the best UI out there, that one’s the SMO with the best UI I’ve seen.

    I’m (unfortunately) having to stick with All-in-one SEO pack for now, because despite the fugliness factor (like Yoast), it gives the best control over SMO that I’ve seen in any plugin so far.

    Looking forward to playing around with your new framework, and all the best with improving this already awesome plugin.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hello Haroon,

    The rather uncreatively named plugin does rank higher in the search results because of it :).

    The integration you’re speaking off can be achieved with either of the following code snippet.
    If you’re unfamiliar with placing code snippets, please refer to this guide.

    Pick either #1 or #2, not both:

    #1: Only take values from The SEO Framework’s SEO Settings metabox (post/page only).

    add_filter( 'fb_og_title', 'my_fb_title_alterations' );
    function my_fb_title_alterations( $previous = '' ) {
    
    	$tsf = function_exists( 'the_seo_framework' ) ? the_seo_framework() : null;
    	if ( is_object( 'the_seo_framework' ) ) {
    		$title = the_seo_framework()->get_custom_field( '_genesis_title' );
    	}
    
    	//* Determine if a custom title has been set up. Otherwise; fall back to Webdados'.
    	$title = $title ? $title : $previous;
    
    	return $title;
    }
    
    add_filter( 'fb_og_desc', 'my_fb_desc_alterations' );
    function my_fb_desc_alterations( $previous = '' ) {
    
    	$tsf = function_exists( 'the_seo_framework' ) ? the_seo_framework() : null;
    	if ( is_object( 'the_seo_framework' ) ) {
    		$desc = the_seo_framework()->get_custom_field( '_genesis_description' );
    	}
    
    	//* Determine if a custom description has been set up. Otherwise; fall back to Webdados'.
    	$desc = $desc ? $desc : $previous;
    
    	return $desc;
    }

    #2 Get any title and description made by The SEO Framework, even the automated versions:

    add_filter( 'fb_og_title', 'my_fb_title_alterations' );
    function my_fb_title_alterations( $previous = '' ) {
    
    	$tsf = function_exists( 'the_seo_framework' ) ? the_seo_framework() : null;
    	if ( is_object( 'the_seo_framework' ) ) {
    		//* 'true' means that it will bypass the WordPress theme title checks.
    		$title = the_seo_framework()->title_from_cache( '', '', '', true );
    	}
    
    	//* Determine if a custom title has been set up. Otherwise; fall back to Webdados'.
    	$title = $title ? $title : $previous;
    
    	return $title;
    }
    
    add_filter( 'fb_og_desc', 'my_fb_desc_alterations' );
    function my_fb_desc_alterations( $previous = '' ) {
    
    	$tsf = function_exists( 'the_seo_framework' ) ? the_seo_framework() : null;
    	if ( is_object( 'the_seo_framework' ) ) {
    		//* 'true' means it will get a longer, social version of the description.
    		$desc = the_seo_framework()->description_from_cache( true );
    	}
    
    	//* Determine if a custom description has been set up. Otherwise; fall back to Webdados'.
    	$desc = $desc ? $desc : $previous;
    
    	return $desc;
    }

    I hope this helps :). And if you’d like, you can refer the plugin authors of “Facebook Open Graph, Google+ and Twitter Card Tags” to this reply as to see how to easily get data from The SEO Framework.

    Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sitemap not working’ is closed to new replies.