I have a rare error. I have translated my website in to multiple languages, using Magento, like www.example.com/de Now, I have added www.example.com/de in Search console and I want to send the sitemap, Google tells me to add the name of the sitemap that the page has to have structure of www.example.com/de/... but I can't do that because I have to create a folder in the root /de and if I go to www.example.com/de I see an error 403. Please suggest how I could do this, Thanks!
2 Answers
Google allows you to add multiple sitemaps for each domain. You are not required to have these maps in different sub-folders. You will need to create ones with different names for each language. for example de-sitemap.xml
or sitemap-de.xml
- In your Magento admin navigate to Catalog -> Google Sitemap
Create a sitemap with different names for each language. A language is usually associated with a store view. For example:
Filename => sitemap-de.xml Path => / Store View => German
Add the sitemap for each language to your Google Search Console. In our example it would be
http://www.yourdomain.com/sitemap-de.xml
Magento can update your sitemap regularly. Go to System > Configuration > Catalog > Google Sitemap > Generation Settings. Enable Generation and set the frequency as desired.
This is the appropriate solution for handling multilingual websites, but there is another issue we're facing. When we created this:
Filename => sitemap-en.xml
Path => /media/sitemap/
Store View => English
The sitemap index generated is correct but the sitemaps within are changing URL to example.com/en/media/sitemap/sitemap-en-1-1.xml which is a 404 and it doesn't exit.
Note that if we remove the /en/ subdirectory the sitemap opens correctly. How to solve this? What are we missing here?
-
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review– CladiussCommented Aug 17, 2023 at 9:24
de-sitemap.xml
for your German store and i.e.en-sitemap.xml
for your English store and set the path to be/
. What is your further requirement in this that makes need to have this particular structure?