Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Sitemap lists http URLs on an https site: how to fix it

SEO-107Low impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

An XML sitemap is a file, usually at /sitemap.xml, that lists the URLs you want search engines to crawl. This issue means the <loc> entries start with http:// while your live pages load on https://.

It usually happens after a site moves to https and the site address setting, a hard-coded sitemap or a cached copy still uses the old protocol. The pages still open, because the server redirects http to https. The sitemap is just pointing at the old addresses.

What the problem looks like in sitemap.xmlhtml
<url>
  <loc>http://www.example.com/pricing/</loc>
  <lastmod>2025-01-15</lastmod>
</url>

Why it costs you leads or sales

The direct impact is low, since the redirect usually gets visitors to the right page. But a sitemap is meant to be a clean list of the final, canonical URLs. Http entries weaken that signal.

What http entries can cause
  • Wasted crawl effort: each URL needs an extra redirect hop before the real page is reached.
  • Mixed signals: the sitemap says http is the preferred version while your canonicals say https.
  • Slower pickup of new or changed pages on larger sites.
  • Noisy reports in Search Console, where the sitemap and the indexed URLs do not match.
  • Risk of a bigger problem if the https redirect ever breaks, because the sitemap would then point at pages that no longer resolve.
How a crawler meets an http sitemap entry
  1. Crawler reads sitemapFinds http://example.com/pricing/
  2. Requests http URLWrong protocol listed in the sitemap
  3. 301 redirect to httpsExtra hop on every entry
  4. Final https pageIndexed only after the redirect is followed

The sitemap sends the crawler to the old protocol, which costs an extra hop on every URL.

How to check if your site has it

Check your sitemap for http URLs
  1. Open the sitemap

    Visit https://yourdomain.com/sitemap.xml in a browser. If it is a sitemap index, open each child sitemap too.

  2. Look at the loc entries

    Use view-source or Ctrl+F and search for http://. Any match inside a <loc> tag is the problem.

  3. Check from the command lineCustom code

    Count the http entries with the command below. A result above 0 means you have the issue.

  4. Check Search Console

    Open Indexing > Sitemaps and look at the submitted sitemap. Also run the URL Inspection tool on a listed URL to see whether Google reports a redirect.

Count http:// entries in your sitemapbash
curl -s https://www.example.com/sitemap.xml | grep -c "<loc>http://"

How to fix it

The sitemap is almost always generated from a setting, so fix the setting rather than editing the file by hand. The right place depends on your platform.

Switch the sitemap to https by platform
  1. Update the site address

    Go to Settings > General and change both WordPress Address (URL) and Site Address (URL) to https://. Save.

  2. Check for hard-coded values

    If the fields are greyed out, WP_HOME and WP_SITEURL are set in wp-config.php. Change them to https there.

  3. Clear caches

    Purge your caching plugin and any server or CDN cache. Yoast, Rank Math and the built-in WordPress sitemap all read the site address, so they update once it is correct.

After the sitemap is correct
  1. Match the host exactly

    Make sure the sitemap uses the same version as your canonical tags: https, and with or without www, the same way everywhere.

  2. Resubmit the sitemap

    In Google Search Console go to Indexing > Sitemaps, and resubmit the sitemap URL. Do the same in Bing Webmaster Tools if you use it.

How to confirm it's fixed

Confirmation checks
  • Open the sitemap in a private window and search for http://: there are no matches in <loc> tags.
  • The curl count command returns 0 for the main sitemap and every child sitemap.
  • A listed URL returns 200 directly, with no redirect, when you request it with https.
  • Search Console shows the sitemap as Success and the discovered URL count looks right.
  • Canonical tags on the pages use the same protocol and host as the sitemap.

How to prevent it happening again

Habits that stop it coming back
  • Always use an https site address after a migration, and test the sitemap as part of the migration checklist.
  • Avoid hard-coding full URLs in custom sitemap files; build them from one base URL setting.
  • Re-check the sitemap after changing hosting, CDN, proxy or SSL settings.
  • Re-check after restoring a backup or copying a database from an older http environment.
  • Run a crawl with a tool such as Screaming Frog or Sitebulb now and then and review its sitemap reports for non-https URLs.

How FunnelGuard handles this

FunnelGuard does not check this yet. Reading the protocol of every sitemap entry is a possible future check, but today it is not part of the product.

What FunnelGuard does do is run your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, and check each step, the tracking hits and whether test leads arrive. That covers the paths that bring in leads and sales, not your sitemap file.

To watch for this issue today, use the curl command above in a scheduled job or run a periodic crawl, and review the Sitemaps report in Google Search Console. You can also run the free read-only website audit from FunnelGuard, but treat it as a general review rather than a sitemap monitor.

Questions people ask

Why does my sitemap show http URLs when my site is https?

The sitemap is built from your configured site address or a hard-coded base URL. If that value still says http, or a cached copy was made before the https switch, the entries keep the old protocol. Fix the setting, clear caches and regenerate the file.

Does an http sitemap hurt my SEO rankings?

Not directly in most cases, because the redirect still reaches the https page. It does waste crawl effort and sends mixed signals about the preferred URL version. It is a low-impact but easy fix.

How do I change my WordPress sitemap from http to https?

Go to Settings > General and set both WordPress Address and Site Address to https. If the fields are locked, edit WP_HOME and WP_SITEURL in wp-config.php. Then clear your caches so Yoast, Rank Math or the core sitemap regenerates.

Should the sitemap use www or non-www, http or https?

Use exactly the version your canonical tags and redirects point to. For nearly every site that means https, with one consistent choice for www or non-www. Every URL in the sitemap should return 200 without a redirect.

Do I need to resubmit my sitemap after switching to https?

It is a good idea. Resubmit it in Google Search Console under Indexing > Sitemaps, and in Bing Webmaster Tools if you use it. Crawlers will also re-read it on their own, but resubmitting speeds up the check.

How can I quickly check if my sitemap has http links?

Open the sitemap and search for http:// inside the loc tags, or run curl -s https://yourdomain.com/sitemap.xml | grep -c "<loc>http://". Any number above 0 means some entries use the wrong protocol. Check child sitemaps too.

Does FunnelGuard check my sitemap for http URLs?

No. FunnelGuard does not check sitemap protocols yet. It monitors your customer journeys, tracking hits and test leads, so use a crawler or Search Console for sitemap checks.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.