discuss.answer
-
☆ A M B ☆
- 427 Posts
Make sure the alias is sitemap.xml
Switch to the settings tab uncheck everything in the bottom right except emtpy cache. You don't need any of them.
Set the type to XML
Set the Template to empty.
Publish and hide from menu.
Save.
Clear cache.
Hit view
I assume you installed the Google Sitemap Package from the Repository and have [[GoogleSiteMap?]] as the only page content.
I think I did do all that you mentioned, and the resource is named sitemap.xml. However, it's not in the root of my site so navigating to www.mydomain.com/sitemap.xml should at least bring up a blank page at a minimum. Instead, I get a 404 error.
I'm in the process of deleting the TVs and chunk I created now. I went to package management and found GoogleSiteMap there, and will give that a try.
I appreciate your quick response to my query. MODx and this forum is such a great resource. I can only hope that one day, I am more proficient and can offer assistance to others.
Thank you.
-
☆ A M B ☆
- 427 Posts
Quote from: mmcgee at Jun 06, 2013, 09:58 PM
I'm in the process of deleting the TVs and chunk I created now. I went to package management and found GoogleSiteMap there, and will give that a try.
My instructions are for the GoogleSiteMap Package. Takes about 60 seconds to do once you have done it once.
Also make sure there is no sitemap.xml file or it will take precedence as MODX will not be feeding that.
You need a Resource with an alias of sitemap.xml
the name is non important.
OK. I install the GoogleSiteMap.
Sounds like I need to put this snippet [[!GoogleSiteMap]] somewhere.
I do not currently have a sitemap.xml file in the root, but I don't understand how to create a resource with an alias of 'sitemap.xml'
I've created the resource. Set template to 'empty'. Set output to XML. Name the resource 'sitemap.xml' and then I typed 'sitemap.xml' in the Resource alias field. Cleared the cache.
Also checked the 'Hide Page from Menu' box, and checked the 'Publish' Box.
But... when I navigate to my domain.com/sitemap.xml I still am getting the 404 page not found.
-
☆ A M B ☆
- 427 Posts
Is it published? And usually hidden from menus..
Also, use the view button in the top right.
When I used the view button in the upper right, a page did appear. Everything was in kind of one long horizontal string — not like the formatting I usually see in an XML file. I'm pretty sure that the friendly URL thing is the issue.
Question:
Does this snippet only populate the sitemap.xml file with only pages that are published? I guessing it does, but it's certainly worth my asking.
I'm anxious about the friendly URLs. The site is new. It's my first, pretty intense site created in MODx. I hope the thing doesn't fly apart like a dollar watch!
When I used the view button in the upper right, a page did appear. Everything was in kind of one long horizontal string — not like the formatting I usually see in an XML file. I'm pretty sure that the friendly URL thing is the issue.
Question:
Does this snippet only populate the sitemap.xml file with only pages that are published? I guessing it does, but it's certainly worth my asking.
I'm anxious about the friendly URLs. The site is new. It's my first, pretty intense site created in MODx. I hope the thing doesn't fly apart like a dollar watch!
Thank you for the assistance. For now, it's late. I'll follow step 1 in Bob's book and back up the ht.access file. Then catch some sleep and attack the Friendly URLs with a fresh brain in the am.
Best,
Marc