• Resolved Gulshan Kumar

    (@thegulshankumar)


    But why would you do it? I understand. I’ll explain.

    My client to run a not-so-secret blog but yet they want to hide what they post, make any new update and not. This is an important step to keep pray-eyes off. Such blog focusing on certain niche, doesn’t require displaying stuff at homepage but just for SE. Is it Blackhat? Not at all. It’s just how things works if you want to remain profitable in long run. Because, copy-paster are everywhere and this is only way, not doing show off is better.

    Let’s understand in different example why small thing like this matter in a business for privacy of information.

    If you’re not using Wildcard SSL Cert, you’re exposing all your subdomains and you probably not want to do it for various reason such as exposing internal info.

    Similarly, my client don’t want to give an easy access. Of course, there are other ways but XML sitemap is most common for ultra-noob-cum-typical-copy-paste-blogger.

    I hope it’s clear. ??

    Thanks

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

    (@cybr)

    Hello!

    This will do:

    add_filter( 'the_seo_framework_sitemap_endpoint_list', function( $list ) {
    
    	if ( isset( $list['base'] ) ) {
    		// Set custom human-readable name.
    		$list['base']['endpoint'] = 'sitemap-900142.xml';
    		// Set custom computer name.
    		$list['base']['regex']    = '/^sitemap\-900142\.xml/';
    		// Remove from robots.txt listing.
    		$list['base']['robots']   = false;
    	}
    
    	// Remove Yoast-esque /sitemap_index.xml imbecile-hosting (Namecheap)-compatibility output.
    	unset( $list['index'] );
    
    	return $list;
    } );

    You just need to change sitemap-900142 and sitemap\-900142 to your liking. The regex version needs to have these characters escaped with a backslash before them: [\^$.|?*+(){}. I escaped the hyphen out of old habit.

    Thread Starter Gulshan Kumar

    (@thegulshankumar)

    Thanks for taking time to look into this query. Maybe this is a reason I can suggest many people to use this plugin. ??

    Consider giving us a 5-star review, goes a long way. Cheers, Gulshan!

    Thread Starter Gulshan Kumar

    (@thegulshankumar)

    Done. Well deserved ??

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can we change sitemap URL?’ is closed to new replies.