Hi Jamie,
The robots.txt file output is stored in object cache for 86400 seconds (24 hours). If your site is accessible on both HTTPS as HTTP, then this switch can be visible on both schemes.
In the next update (2.8.0), you’re able to select your preferred scheme. I’d suggest to set that to HTTPS: not only to prevent duplicated content, but also for better ranking. Because HTTPS is preferred over HTTP in Google’s ranking.
If you wish to grab a copy of 2.8.0, you can get an Dev version (use at own risk!!!) from GitHub.
Alternatively, you could use the (untested) snippet below and place it in your theme’s functions.php
file. Be sure to remove it when you update to 2.8.0 to prevent mistakes.
The snippet will force the HTTPS scheme, on both the canonical URL, as within the sitemap, as in the robots.txt output:
add_filter( 'the_seo_framework_canonical_force_scheme', 'my_seo_scheme_forcing', 10, 2 );
function my_seo_scheme_forcing( $scheme = null, $current_scheme = 'http' ) {
if ( 'http' === $current_scheme )
return 'https';
return $scheme;
}
I hope this helps and clears things up. Cheers ??
-
This reply was modified 8 years, 2 months ago by
Sybre Waaijer.
-
This reply was modified 8 years, 2 months ago by
Sybre Waaijer. Reason: typo in code