Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
Adding hreflang tags - better on each page, or the site map?
- 
					
					
					
					
 Hello, I am wondering if there seems to be a preference for adding hreflang tags (from this article). My client just changed their site from gTLDs to ccTLDs, and a few sites have taken a pretty big traffic hit. One issue is definitely the amount of redirects to the page, but I am also going to work with the developer to add hreflang tags. My question is - is it better to add them to the header of each page, or the site map, or both, or something else? Any other thoughts are appreciated. Our Australia site, which was at least findable using Australia Google before this relaunch, is not showing up, even when you search the company name directly. Thanks!Lauryn 
- 
					
					
					
					
 Yes, your own second guess is the correct one. The hreflang in URL based, not domain base, so you have to specify it for every single URL that needs it. 
- 
					
					
					
					
 Thank you so much. Does it suffice if we put this code in the header across the site, or does each unique url need to have a specialized url in the code. Ex: Is the following good for the entire site: Vs. AND AND Etc...up to 100+ pages.... 
- 
					
					
					
					
 First of all remember that the hreflang annotation is not necessarily needed in every page. 
 Said that, it really depends on your devs facilities what method to use, if in-code or using the sitemaps.Both work fine, and what you should not do is using both at the same time, because the possibility of creating contradictory hreflang annotations increases. 
- 
					
					
					
					
 It depends on the setup of your site, to be honest. If you have a Wordpress, Joomla, etc. with really easy access header sections that you can put the code in once and it's done forevermore no matter what pages are added, that's the simplest way. If your dev can script it to add to each page through the sitemap, that's also a one & done way. The only thing you really don't want to do is have to add a hreflang tag to every new page you add to the site. As long as you can avoid that, you should be right. We had a client add it to their sitemap but the sitemap wasn't auto-generating the tag so each time they updated they had to re-implement the tags. That was a frustrating time ... now we've got it automatically updating so it's much easier to maintain. 
- 
					
					
					
					
 I think all the implementations work just about the same. We chose to do it in our sitemaps because that was the easiest for our developer to implement. You should choose one or the other, there's no need to do multiple implementations. 
Browse Questions
Explore more categories
- 
		
		Moz ToolsChat with the community about the Moz tools. 
- 
		
		SEO TacticsDiscuss the SEO process with fellow marketers 
- 
		
		CommunityDiscuss industry events, jobs, and news! 
- 
		
		Digital MarketingChat about tactics outside of SEO 
- 
		
		Research & TrendsDive into research and trends in the search industry. 
- 
		
		SupportConnect on product support and feature requests. 
Related Questions
- 
		
		
		
		
		
		Would You Redirect a Page if the Parent Page was Redirected?
 Hi everyone! Let's use this as an example URL: https://www.example.com/marvel/avengers/hulk/ We have done a 301 redirect for the "Avengers" page to another page on the site. Sibling pages of the "Hulk" page live off "marvel" now (ex: /marvel/thor/ and /marvel/iron-man/). Is there any benefit in doing a 301 for the "Hulk" page to live at /marvel/hulk/ like it's sibling pages? Is there any harm long-term in leaving the "Hulk" page under a permanently redirected page? Thank you! Matt Intermediate & Advanced SEO | | amag0
- 
		
		
		
		
		
		Home Page Disappears From Google - But Rest of Site Still Ranked
 As title suggests we are running into a serious issue of the home page disapearing from Google search results whilst the rest of the site still remains. We search for it naturally cannot find a trace, then use a "site:" command in Google and still the home page does not come up. We go into web masters and inspect the home page and even Google states that the page is indexable. We then run the "Request Indexing" and the site comes back on Google. This is having a damaging affect and we would like to understand why this issue is happening. Please note this is not happening on just one of our sites but has happened to three which are all located on the same server. One of our brand which has the issue is: www.henweekends.co.uk Intermediate & Advanced SEO | | JH_OffLimits0
- 
		
		
		
		
		
		Category Page as Shopping Aggregator Page
 Hi, I have been reviewing the info from Google on structured data for products and started to ponder. Intermediate & Advanced SEO | | Alexcox6
 https://developers.google.com/search/docs/data-types/products Here is the scenario.
 You have a Category Page and it lists 8 products, each products shows an image, price and review rating. As the individual products pages are already marked up they display Rich Snippets in the serps.
 I wonder how do we get the rich snippets for the category page. Now Google suggest a markup for shopping aggregator pages that lists a single product, along with information about different sellers offering that product but nothing for categories. My ponder is this, Can we use the shopping aggregator markup for category pages to achieve the coveted rich results (from and to price, average reviews)? Keen to hear from anyone who has had any thoughts on the matter or had already tried this.0
- 
		
		
		
		
		
		H2 Tags- Can you have more than 1 H2 tag
 Hi All, Screaming frog has identified that we have a few H2 tags on our pages , although we only have 1 H1 tag. We have numerous H3,H4's etc. I am wondering, is it good SEO to have only 1 H2 tag like with H1 tag or can you have more ? thanks Peter Intermediate & Advanced SEO | | PeteC120
- 
		
		
		
		
		
		Are pages with a canonical tag indexed?
 Hello here, here are my questions for you related to the canonical tag: 1. If I put online a new webpage with a canonical tag pointing to a different page, will this new page be indexed by Google and will I be able to find it in the index? 2. If instead I apply the canonical tag to a page already in the index, will this page be removed from the index? Thank you in advance for any insights! Fabrizio Intermediate & Advanced SEO | | fablau0
- 
		
		
		
		
		
		Should the sitemap include just menu pages or all pages site wide?
 I have a Drupal site that utilizes Solr, with 10 menu pages and about 4,000 pages of content. Redoing a few things and we'll need to revamp the sitemap. Typically I'd jam all pages into a single sitemap and that's it, but post-Panda, should I do anything different? Intermediate & Advanced SEO | | EricPacifico0
- 
		
		
		
		
		
		Should I Allow Blog Tag Pages to be Indexed?
 I have a wordpress blog with settings currently set so that Google does not index tag pages. Is this a best practice that avoids duplicate content or am I hurting the site by taking eligible pages out of the index? Intermediate & Advanced SEO | | JSOC0
 
			
		 
			
		 
			
		 
			
		 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				