We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48447
    • 10 Posts
    Hi again! I have installed a sitemapFriend extra to create sitemap.xml. Generally everything is fine - I can access this file via http:/myportal/sitemap.xml.

    BUT this file doesn`t really exist in the root folder. So, when I try to submit it in my googlewebmasters profile, it returns 404-error because there is no such file there. How can I fix it and make google accept it? [ed. note: warior30 last edited this post 9 years, 9 months ago.]
      • 40045
      • 534 Posts
      where did you put the sitemapFriend snippet?

      I guess it should work like this:

      1. enable friendly urls
      2. create a new resource called Sitemap with alias sitemap
      3. Set the content type (under Settings tab of the resource) to XML
      4. Put the snippet [[sitemapFriend? &type=`xml`]] in the content
      5. save the resource
      6. hit "Preview" and the browser should show a page at http://www.yourdomain.tld/sitemap.xml

      then you can submit to google
        • 48447
        • 10 Posts
        exside thank you for your answer! The story is that I actually took all these steps and everything is fine but that google issue. The problem is that Google is searching for a file that doesn`t really exist and 404-error is returned. Probably, I should write a script that really creates sitemap.xml in the root folder?
          • 42046
          • 436 Posts
          Have you tried pdoSitemap (part of pdoTools)? I've never had an issue with Google reading it's sitemaps. Yes, the files don't physically exist on the server (in the normal way), just like any other page generated by MODX, but Google shouldn't have a problem reading them.

          What is actually displayed in the browser when you open up the sitemap?
            • 3749
            • 24,544 Posts
            I just did this: http://rtfm.modx.com/extras/revo/getresources/getresources.examples/getresources.google-xml-sitemap

            Google is definitely fine with a Resource that outputs plain XML content. Just make sure you point Google to the full URL of the Resource, not to a file.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 48447
              • 10 Posts
              What is actually displayed in the browser when you open up the sitemap?

              The data in xml format is displayed in the browser as if sitemap.xml really existed.

              BobRay thank you! I shall try it.