Hreflang in header...should I do a Sitemap?
-
A client implemented hreflang tags in the site header. MOZ says you aren't supposed to do an hreflang Sitemap as well. My question is how should I do a Sitemap now (or should I do one at all)?
-
Hi there,
There are many ways to do it. In my opinion:
- If the amount of pages is low, you can do it in just one sitemap.
- If the amount is really huge, do it in different sitemaps, stating in the name of each of them the language (e.g. sitemap-es-mx.xml) and create a sitemap_index.hml with all those.
Remember that its best practice to have the sitemaps in the root folder: domain.com/sitemap
Best luck.
GR. -
Hi Gaston - Thanks for the response. My urls are set up like so:
- mysite.com/us/en/page
- mysite.com/fr/fr/page
- mysite.com/ca/fr/page
- mysite.com/mx/es/page
- mysite.com/es/es/page
And so on. Would you recommend doing a separate sitemap for each language/country? Thus:
- mysite.com/us/en/sitemap.xml
- mysite.com/fr/fr/sitemap.xml
- mysite.com/ca/fr/sitemap.xml
- mysite.com/mx/es/sitemap.xml
- mysite.com/es/es/sitemap.xml
Thanks!
-
Hello there!
Yes you should, better you must do a sitemap, but do not include the hreflang attribute.
Here: Google Search Console help you can see how a sitemap INCLUDING the hreflang looks like. Remove the portion:<xhtml:link <br="">rel="alternate"
hreflang="de"
href="http://www.example.com/deutsch/"
/></xhtml:link>Hope it helps.
Good Luck!
GR.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Do I need to use a trailing slash to homepage in canonical and hreflang?
Currently I have a 301 redirect from
Intermediate & Advanced SEO | | lcourse
https://www.mysite.com/
to
https://www.mysite.com And in my canonical and hreflang and also insite links I use consistently https://www.mysite.com without trailing slash. Is this OK? Or do I need to add a trailing slash?0 -
Does Google index language flags/links in header, even if only 1 is visible at a time?
Hi, I want to pass link juice from my English website to my other languages. Does Google index language flags/links in header? Only 1 flag is visible at a time, and from what i´ve read, Google does not index content that is not visible to the user without clicks, like content behind tabs. I´m guessing language drop downs could fall under the same category as well...? Any knowledge on this... thank you for your time!
Intermediate & Advanced SEO | | guidetoiceland0 -
Is there an automated way to test what HREFLANG is ranking for in google and yandex?
Hi everyone, We implemented HREFLANG code for our international sites. We are wondering is there an automated way to test is HREFLANG is working vs. manually browsing in each international search engine? Also, we implemented this a few days ago, and google webmaster tools stlil hasn't picked up that we have it implemented. I've heard it taking anywhere from 2-8 days. At what point would we see results. our site is http://www.datacard.com Is there an order that the site listings have to follow, for example should x-default be the last item listed? Thanks, Laura
Intermediate & Advanced SEO | | lauramrobinson320 -
Change in sitemap from XML to PHP caused to lose all organic rankings
Hi MOZers, I need some advice for my website: http://www.scorepromotions.ca/ I recently changed the sitemap submitted to GWT from http://www.scorepromotions.ca/sitemap.xml to http://www.scorepromotions.ca/google-sitemap.php I deleted the previously submitted XML sitemap from GWT on Friday & submitted the PHP sitemap on the advice of our developer. On Saturday, I noticed that all our organic rankings disappeared. So, I changed the PHP sitemap back to XML sitemap on Sunday. I am hoping to see my organic rankings recover to previous levels. Does anyone have any advice or experience to share about this issue ? Ankush
Intermediate & Advanced SEO | | ScorePromotions0 -
Webmaster Tools "Not found" errors after sitemap update
Hello Mozzers - I found a sitemap with loads of URL errors on it (none of the URLs on sitemap actually existed) so I went ahead and updated sitemap - now I'm seeing a spike in "not found" errors in WMT - is this normal / anything to worry about when you significantly change a sitemap. I've never replaced every URL on a sitemap before! L
Intermediate & Advanced SEO | | McTaggart0 -
How Do I Generate a Sitemap for a Large Wordpress Site?
Hello Everyone! I am working with a Wordpress site that is in Google news (i.e. everyday we have about 30 new URLs to add to our sitemap) The site has years of articles, resulting in about 200,000 pages on the site. Our strategy so far has been use a sitemap plugin that only generates the last few months of posts, however we want to improve our SEO and submit all the URLs in our site to search engines. The issue is the plugins we've looked at generate the sitemap on-the-fly. i.e. when you request the sitemap, the plugin then dynamically generates the sitemap. Our site is so large that even a single request for our sitemap.xml ties up tons of server resources and takes an extremely long time to generate the sitemap (if the page doesn't time out in the process). Does anyone have a solution? Thanks, Aaron
Intermediate & Advanced SEO | | alloydigital0 -
Sitewide Header Link to Sister Site
Hi, I've just added a sitewide header image link (60 pages) from our general company site pointing to homepage of another brand site of a product that we also own (which focuses in depth on that one brand). I haven't put a nofollow on it as it's just info for those who'd like to reach our other site. Should I expect anything negative out of this for either site? Could it seem like it picked up 60 image links suddenly and raise a flag?
Intermediate & Advanced SEO | | emerald0 -
Use of rel="alternate" hreflang="x"
Google states that use of rel="alternate" hreflang="x" is recommended when: You translate only the template of your page, such as the navigation and footer, and keep the main content in a single language. This is common on pages that feature user-generated content, like a forum post. Your pages have broadly similar content within a single language, but the content has small regional variations. For example, you might have English-language content targeted at readers in the US, GB, and Ireland. Your site content is fully translated. For example, you have both German and English versions of each page. Does this mean that if I write new content in different language for a website hosted on my sub-domain, I should not use this tag? Regards, Shailendra Sial
Intermediate & Advanced SEO | | IM_Learner0