skip to Main Content

I’m generating a simple XML sitemap with PHP and use a .htaccess rewrite the ‘turn’ that file into a .xml file. When I try to submit it to Google, Google gives me an non-descriptive error that I can’t load the sitemap.

Here’s the file: https://www.densediscovery.com/feed/sitemap/sitemap.xml

Does anyone have any ideas why it’s not accepting it? Any other ideas for generating one (with PHP) that is acceptable?

2

Answers


  1. Google is not working like that, you just point to an XML file. (Not a file that changed the name to look like XML).
    You need a PHP that generate a file let’s say myXML.xml

    How to generate XML file dynamically using PHP?

    Then you add the URL of myXML.xml in Google.

    If it looks too complicated you can use any online tool to generate a sitemap

    Login or Signup to reply.
  2. This is probably because your webserver doesn’t recognize .xml as an extension of files that should contain PHP code.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search