I am using InfinityFree hosting, and I am facing an issue with my sitemap.xml file. When trying to verify the file via Google Search Console, I receive a message indicating that the content type is incorrect. The sitemap file is being displayed as “text/html” instead of “application/xml”.
Here’s what I have done to try to resolve the issue:
Ensured that the sitemap.xml file is present in the htdocs folder.
Created a .htaccess file in the same folder and added the following line:
bash
Copy code
AddType application/xml .xml
Opened the sitemap.xml file directly in the browser and confirmed that it is written in the correct XML format.
Verified that the .htaccess file is functioning correctly.
Despite these steps, the problem persists, and I need your assistance in resolving it. Are there any other settings I should modify, or are there specific restrictions regarding the use of .htaccess files on your servers?
I see a sitemap.xml there. But I can also see it’s shown at the top of the file listing which is sorted by name. If it was actually called sitemap.xml, it should be listed between privacy.html and style.css.
Is there maybe a space in front of the file name or another invisible character?
When I open the link, the file is displayed in XML format, but I receive a message indicating that there is no associated style information. I am also having difficulty ensuring that the server is delivering the file correctly.
I have confirmed that the file is saved with a .xml extension and contains all the required elements.
I would appreciate your assistance in identifying and resolving this issue, as I need to ensure the sitemap file works properly with search engines.