cancel
Showing results for 
Search instead for 
Did you mean: 

Sitemap in subfolder - Not best practice...

Sitemap in subfolder - Not best practice...

Hi there.

 

I am wanting to generate my sitemap file in the root folder, however I am struggling with my hosting campany to give me writing permissions. This is a problem as it is best practice to have the sitemap in the root folder. Magento suggests to create a sub-folder /sitemap/... Please help me understand why it is acceptable to have sitemap in sub-folder?

 

Sources indicates that it should be in root folder:

- https://moz.com/community/q/why-do-people-put-xml-sitemaps-in-subfolders-why-not-just-the-root-what-...

https://www.sitemaps.org/protocol.html#location

 

Thank you Smiley Happy 

 

1 REPLY 1

Re: Sitemap in subfolder - Not best practice...

I wouldn't worry about the sitemap location too much. I doubt it's going to affect the final results that much. 100,000s magento sites don't have their sitemap in the root folder. 

 

If you're worried about it though, and you can't get the hosting company to get the permissions right, I'd continue generating the sitemap in a subfolder and then create a symlink at the root level to the subfolder. This means that Magenot still only needs permissions to write in the subfolder but you can link to it from the root level. 

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!