seo 2026-12-02 ⏱ 3 min read

Update XML Sitemaps After SSL Installation

Update XML Sitemaps After SSL Installation

When you install an SSL certificate and redirect to HTTPS, your sitemap should list the HTTPS URLs. A sitemap full of http:// addresses sends crawlers through a redirect for every page, wastes crawl effort and sends mixed signals about the preferred version.

XML sitemaps after SSL: what to change

ItemBeforeAfter
Sitemap <loc> URLshttp://example.com/pagehttps://example.com/page
Sitemap line in robots.txtSitemap: http://example.com/sitemap.xmlSitemap: https://example.com/sitemap.xml
Canonical tagshttp versionhttps version
Search ConsoleHTTP propertyHTTPS property with the new sitemap submitted

XML sitemaps after SSL, step 1: regenerate

If your CMS makes the sitemap, change the site URL to HTTPS in its settings and regenerate. In WordPress, set both addresses to HTTPS under Settings, General, and SEO plugins will rebuild the sitemap. For a static or custom site, use the Sitemap Generator with your HTTPS address.

A minimal valid sitemap looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2026-12-01</lastmod>
  </url>
  <url>
    <loc>https://example.com/about</loc>
  </url>
</urlset>

The namespace URL on the second line stays http://. That is part of the standard and is not a mistake.

Step 2: point robots.txt at it

User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml

The Robots.txt Generator can build this file for you.

Step 3: confirm redirects and canonicals

Every HTTP URL should answer with one 301 to the same path on HTTPS. Check a few with the Redirect Checker. Then make sure canonical tags use HTTPS, which the SEO Checker can flag.

Step 4: Search Console and Bing

  1. Add an HTTPS property in Google Search Console. A domain property covers both HTTP and HTTPS and is the easiest choice.
  2. Open Sitemaps, enter sitemap.xml and submit it.
  3. Check that the status reads Success and the discovered URL count looks right.
  4. Repeat in Bing Webmaster Tools.

Step 5: keep the old sitemap out

Do not leave an HTTP sitemap in place. Redirect it to the HTTPS one, or remove it. Keep the redirects live for as long as you can, ideally permanently.

Related reading: migrating a site to HTTPS, fixing canonical URL issues, HTTPS best practices for SEO and whether HTTPS affects Google rankings.

Frequently Asked Questions

Do I need to submit the sitemap again?

Yes. Submit the HTTPS sitemap in Search Console, even though crawlers will also find it through robots.txt.

Should the sitemap list both HTTP and HTTPS?

No. List only the canonical HTTPS URLs.

Why is my sitemap showing a couldn't fetch error?

The URL may redirect, be blocked by robots.txt, or return an error. Open it in a browser and check that it returns 200 and valid XML.

Does lastmod matter?

Only if it is accurate. Use it for real content changes, not for the date of the HTTPS move.

Do I need to resubmit the sitemap?

Resubmitting helps. Search Console also finds the new URL when the old one redirects, but a fresh submission gets it crawled sooner.

Should the sitemap list both HTTP and HTTPS?

No. List only the HTTPS URLs, because that is the version you want indexed and the version the canonicals point at.

Does lastmod matter?

A little. Search engines treat it as a hint for recrawling, and a wrong date teaches them to ignore the field.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ Post-Installation Verification & SEO Checklist

After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:

  • Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
  • Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
  • Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
  • Confirm both root and www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant