Title: Sitemap not redirecting to HTTPS
Last modified: December 5, 2019

---

# Sitemap not redirecting to HTTPS

 *  Resolved [sylvesterluck](https://wordpress.org/support/users/sylvesterluck/)
 * (@sylvesterluck)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/sitemap-not-redirecting-to-https/)
 * Hello,
    Need a little help, I have a website and I have activate SSL to that,
   Everything is on SSL except the sitemap page, it’s automatically redirecting 
   to http:// mode rather than https mode.I have to type https manually to view 
   sitemap page in https mode. For this I am having search console error.Search 
   console can read sitemap but it’s showing http error.How to redirect http to 
   https automatically.Here’s my .htaccess code though. <IfModule mod_rewrite.c>
   RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME}!-
   f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule
   > # END WordPress
 * I am using yoast SEO.
    Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsitemap-not-redirecting-to-https%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [amboutwe](https://wordpress.org/support/users/amboutwe/)
 * (@amboutwe)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/sitemap-not-redirecting-to-https/#post-12228984)
 * The sitemap uses the WordPress core URL settings located under Admin > Settings
   > General
 * Does the WordPress and/or site URLs use http?
 * Changing these URLs may cause unexpected behavior. For the health and safety 
   of your site, we recommend making a complete backup of your website before changing
   these URLs. Learn more about [the benefits of regular backups](https://wordpress.org/support/article/wordpress-backups/).
 *  [devnihil](https://wordpress.org/support/users/devnihil/)
 * (@devnihil)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/sitemap-not-redirecting-to-https/#post-12229359)
 * If you clear your cache (server, plugin/theme, or CDN such as Cloudflare) does
   this resolve the issue? If you are not sure how to clear your server cache you
   should speak with your host provider.
 * If clearing the cache doesn’t resolve the issue, we would recommend checking 
   your caching settings and to ensure that the sitemap is being excluded from the
   cache.
 * If you are still experiencing an issue with the sitemap not updating after checking
   your caching settings, you can also force a cache reset by temporarily disabling
   the sitemap feature, and then re-enabling. To do so please perform the following
   steps:
    -  ​In WordPress go to SEO>General>Features
       ​For ‘XML Sitemaps’ Toggle the 
      switch to ‘Disabled.’ ​​Click ‘Save Changes.’ ​Toggle the switch back to ‘
      Enabled.’ ​Click ‘Save Changes.’
 * ​We also have a guide on how to enable/disable XML Sitemaps here: [https://kb.yoast.com/kb/enable-xml-sitemaps-in-the-wordpress-seo-plugin/](https://kb.yoast.com/kb/enable-xml-sitemaps-in-the-wordpress-seo-plugin/)
 *  [Saša](https://wordpress.org/support/users/stodorovic/)
 * (@stodorovic)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/sitemap-not-redirecting-to-https/#post-12229970)
 * There aren’t “logic” in WP which could redirect _sitemap\_index.xml_ from _http_
   to _https_ protocol. I quickly checked your sitemaps and it seems that everything
   works correctly.
 * It seems that you didn’t create separate _HTTPS_ property on GSC. Other way is
   to create “Domain property” which includes all variants of you website. On this
   way, you can set proper _HTTPS_ protocol on GSC and submit only https sitemap.
 * More about website properties:
    [https://support.google.com/webmasters/answer/34592?hl=en](https://support.google.com/webmasters/answer/34592?hl=en)
 * So, you need to add https as “URL-prefix property” or update current property
   to “domain property”.
 * _.htaccess_ rules for sitemap redirects (if you choice this way – this rule should
   be before WP rules):
 *     ```
       RewriteCond %{HTTPS} !=on
       RewriteRule ^(|favicon.ico|robots.txt|[a-z]+-sitemap.xml|sitemap_index.xml)$ https://www.mywebsite.com/$1? [R=301,L]
       ```
   
 * It redirects _favicon.ico_ and _robots.txt_ too (because they also aren’t handled
   by WP redirects).
 *  [healthybali](https://wordpress.org/support/users/healthybali/)
 * (@healthybali)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/sitemap-not-redirecting-to-https/#post-12899750)
 * nice
    -  This reply was modified 5 years, 11 months ago by [healthybali](https://wordpress.org/support/users/healthybali/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Sitemap not redirecting to HTTPS’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)

 * 4 replies
 * 5 participants
 * Last reply from: [healthybali](https://wordpress.org/support/users/healthybali/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/sitemap-not-redirecting-to-https/#post-12899750)
 * Status: resolved