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
| Item | Before | After |
|---|---|---|
Sitemap <loc> URLs | http://example.com/page | https://example.com/page |
| Sitemap line in robots.txt | Sitemap: http://example.com/sitemap.xml | Sitemap: https://example.com/sitemap.xml |
| Canonical tags | http version | https version |
| Search Console | HTTP property | HTTPS 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
- Add an HTTPS property in Google Search Console. A domain property covers both HTTP and HTTPS and is the easiest choice.
- Open Sitemaps, enter
sitemap.xmland submit it. - Check that the status reads Success and the discovered URL count looks right.
- 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.
✅ 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
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.