How to Fix “HTTP URLs in Sitemap.xml For HTTPS Site” from Semrush Audit


Table of Contents

A sitemap.xml file is essential for search engine optimization (SEO) as it helps search engines index the pages of your website efficiently. However, when a sitemap contains HTTP URLs for a site that uses HTTPS, it can lead to various issues, such as mixed content warnings, reduced security, and potential SEO penalties. Ensuring that your sitemap.xml file correctly lists HTTPS URLs is crucial for maintaining the integrity and performance of your website.

How to Fix “HTTP URLs in Sitemap.xml For HTTPS Site” Detected by a Semrush Audit


Fixing the issue of HTTP URLs in your sitemap.xml for an HTTPS site is critical for several reasons:

  • Security: HTTPS ensures that data exchanged between the user and the website is encrypted, protecting sensitive information.
  • SEO: Search engines prioritize secure sites. Having HTTP URLs in your sitemap can negatively impact your search rankings.
  • User Trust: Modern browsers flag non-HTTPS sites as “Not Secure,” which can deter users and harm your site’s credibility.
  • Performance: HTTPS can improve site speed and performance, contributing to a better user experience.

How to Fix “HTTP URLs in Sitemap.xml For HTTPS Site” Detected by a Semrush Audit

How to Fix “HTTP URLs in Sitemap.xml For HTTPS Site” Detected by a Semrush Audit

Follow these steps:

Step 1: Identify the Problem

  1. Run a Semrush Audit: If you haven’t already, run a comprehensive site audit using Semrush. Navigate to Projects > Your Project > Site Audit > Start Audit.
  2. Locate the Issue: Once the audit is complete, review the results. Look for the specific error indicating that HTTP URLs are present in your sitemap.xml file.

Step 2: Access and Edit Your Sitemap.xml

  1. Locate Your Sitemap.xml: The sitemap.xml file is usually found at You can access it through your website’s root directory.
  2. Backup Your Sitemap: Before making changes, create a backup of your current sitemap.xml file.

Step 3: Correct the URLs

    1. Open Sitemap.xml for Editing: Use a text editor or an online sitemap editor to open your sitemap.xml file.
  • Find and Replace HTTP with HTTPS:
  • Use the find and replace feature (usually Ctrl+H or Cmd+H) in your text editor.
  • Search for “http://” and replace all instances with “https://”.
  • Ensure that all URLs in the sitemap are now prefixed with “https://”.

Step 4: Verify and Update the Sitemap

  1. Validate the Sitemap: After editing, use an online sitemap validator (like the one provided by Google Search Console) to ensure that the sitemap.xml file is correctly formatted and contains no errors.
  2. Upload the Sitemap: Replace the existing sitemap.xml file on your server with the updated version.

Step 5: Notify Search Engines

  • Submit the Updated Sitemap to Search Engines:
  • Google Search Console: Go to Google Search Console > Index > Sitemaps. Enter the URL of your updated sitemap.xml file and click “Submit”.
  • Bing Webmaster Tools: Similar steps apply. Go to Bing Webmaster Tools > Sitemaps, and submit your updated sitemap.

Step 6: Re-Run the Semrush Audit

  1. Verify the Fix: After updating your sitemap.xml, run another audit with Semrush to ensure that the issue is resolved and there are no remaining HTTP URLs.

Ensuring that your sitemap.xml file contains only HTTPS URLs is a vital step in maintaining your website’s security, SEO performance, and user trust. By following these steps, you can effectively address the issue of HTTP URLs in your sitemap.xml, ensuring your site remains secure and performs optimally in search engine rankings. But if the steps above don’t resolve the issue, feel free to contact our team for assistance.

Share a post

Request a
free website audit

What to read next