Black Friday Sale! Save up to 50% off!

Can sitemap.xml be generated with non .html URLs to match the redirect in .htaccess?

chris3757
3 Posts
chris3757 posted this 4 weeks ago
Ask a Question

Hi,

I've updated the .htaccess file to redirect to non-www and non .html URLs. The sitemap.xml is generated with non-www, but included .html URLs. I've selected "Create Links without .html" in site settings (but your colleague told me this was for nicepage hosting). Is there anyway of generating non .html URLs in the sitemap.xml? It's confusing Google Search Console, so otherwise I need to replace with a manually updated sitemap.

Thanks, Chris

Hi, I've updated the .htaccess file to redirect to non-www and non .html URLs. The sitemap.xml is generated with non-www, but included .html URLs. I've selected "Create Links without .html" in site settings (but your colleague told me this was for nicepage hosting). Is there anyway of generating non .html URLs in the sitemap.xml? It's confusing Google Search Console, so otherwise I need to replace with a manually updated sitemap. Thanks, Chris

Last edited 4 weeks ago by chris3757

Vote to pay developers attention to this features or issue.
1 Reply
Order By: Standard | Newest
Support Team
Support Team posted this 4 weeks ago

Hello Chris,

Thank you for reaching out about the sitemap configuration issue.

We understand the need to keep your URLs consistent for SEO and Google Search Console.

Addressing .html URLs in the Sitemap:
Currently, the "Create Links without .html" option in Nicepage affects only Nicepage-hosted sites. Unfortunately, there isn’t a direct setting to generate a sitemap.xml without .html extensions for external hosting.

Suggested Solution:
1. Use a Third-Party Sitemap Generator:
Since Nicepage does not offer the option to remove .html extensions in the sitemap.xml for externally hosted sites, you may consider using a third-party sitemap generator that allows more control over URL formatting.

  1. Manually Edit the Sitemap (as a Short-Term Fix):
    For immediate results, you could edit the sitemap.xml file manually to remove .html extensions from the URLs. Upload this revised sitemap to your server and submit it to Google Search Console.

  2. URL Rewrite Rules in .htaccess:
    Ensure your .htaccess rules redirect requests for URLs with .html to URLs without the extension. This way, even if Google crawls a .html URL, it will redirect to the correct non-.html URL, helping to avoid duplicate content issues.

Please let us know if you need further assistance.
...................................................
Sincerely,
Ahmad.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello Chris, Thank you for reaching out about the sitemap configuration issue. We understand the need to keep your URLs consistent for SEO and Google Search Console. **Addressing .html URLs in the Sitemap:** Currently, the "Create Links without .html" option in Nicepage affects only Nicepage-hosted sites. Unfortunately, there isn’t a direct setting to generate a sitemap.xml without .html extensions for external hosting. **Suggested Solution:** 1. **Use a Third-Party Sitemap Generator:** Since Nicepage does not offer the option to remove .html extensions in the sitemap.xml for externally hosted sites, you may consider using a third-party sitemap generator that allows more control over URL formatting. 2. **Manually Edit the Sitemap (as a Short-Term Fix):** For immediate results, you could edit the sitemap.xml file manually to remove .html extensions from the URLs. Upload this revised sitemap to your server and submit it to Google Search Console. 3. **URL Rewrite Rules in .htaccess:** Ensure your .htaccess rules redirect requests for URLs with .html to URLs without the extension. This way, even if Google crawls a .html URL, it will redirect to the correct non-.html URL, helping to avoid duplicate content issues. Please let us know if you need further assistance. ................................................... Sincerely, Ahmad. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments