XHTML tag syntax for rel=alternate hreflang
-
Is there a difference in the below two tags? My dev team is saying the first can be implemented (technical issue on their end), even though second is preferable, according to support.google.com, in the below two sitemap hreflang notations. My question is, will the first xhtml tag work for Google? Appreciate the input.
<xhtml:link href="<a href="http://store.hp.com/CanadaStore/" rel="nofollow" target="_blank">http://store.hp.com/CanadaStore/" hreflang="en-ca" rel="alternate" /></xhtml:link href="<a>
<xhtml:link href="<a href=" http:="" store.hp.com="" canadastore="" "="" rel="nofollow" target="_blank">http://store.hp.com/CanadaStore/" rel="alternate" hreflang="en-ca" /></xhtml:link >
-
In my experience a couple of spaces and the order of attributes don't matter at all. Google will understand just as easily and your developers won't have to jump through extra hoops.
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
-
Shopify Canonicals for Tagged Filters
I've been researching this topic endlessly and thought I had arrived at a solution but Screaming Frog indicates my solution was not successful. Problem: I used tags to filter my collections pages. The result, I discovered, was the creation of dozens and dozens, maybe hundreds, of additional collection URLs for each possible permutation of tag filters. I would like to make the collection page URL, with no tag filters, the canonical. Proposed Solution: I found the following code described somewhere as the solution: {% if template contains 'collection' and current_tags %} {% else %} {% endif %} However, I crawled my site with Screaming Frog and found that the canonical link element is still listed as the URL with the tags included. The crawler does recognizes the "noindex" instruction. Any ideas on what the best move is here?
Technical SEO | | vgusvg0 -
Rel=canonical redirect form sign-up to homepage
hi guys, just an idea- in our product- TrackTest.eu we have couple of authoritative websites linking directly to our Sign-up page. Does it make sense to use rel=canonical on Sign-up page with pointing to the homepage so we will pass some link juice to homepage ? I understand that it is not a use how was canonical designed (it is not duplicated content) and don't want to screw anything. Thanks
Technical SEO | | tracktest.eu0 -
Title Tag vs. H1 / H2
OK, Title tag, no problem, it's the SEO juice, appears on SERP, etc. Got it. But I'm reading up on H1 and getting conflicting bits of information ... Only use H1 once? H1 is crucial for SERP Use H1s for subheads Google almost never looks past H2 for relevance So say I've got a blog post with three sections ... do I use H1 three times (or does Google think you're playing them ...) Or do I create a "big" H1 subhead and then use H2s? Or just use all H2s because H1s are scary? 🙂 I frequently use subheads, it would seem weird to me to have one a font size bigger than another, but of course I can adjust that in settings ... Thoughts? Lisa
Technical SEO | | ChristianRubio0 -
Setting title tag with javascript/jquery
Hi there, I'm looking for some advice. I've recently implemented a few jQuery functions which gets specific content from the page and then sets the title and description. See working example here. It seems to work fine but my question I have is whether Google bots can read it and whether it might actually hinder my SEO efforts? Any advice would be really appreciated! Peter
Technical SEO | | peterallen0 -
ECommerce Problem with canonicol , rel next , rel prev
Hi I was wondering if anyone willing to share your experience on implementing pagination and canonical when it comes to multiple sort options . Lets look at an example I have a site example.com ( i share the ownership with the rest of the world on that one 😉 ) and I sell stuff on the site example.com/for-sale/stuff1 example.com/for-sale/stuff2 example.com/for-sale/stuff3 etc I allow users to sort it by date_added, price, a-z, z-a, umph-value, and so on . So now we have example.com/for-sale/stuff1?sortby=date_added example.com/for-sale/stuff1?sortby=price example.com/for-sale/stuff1?sortby=a-z example.com/for-sale/stuff1?sortby=z-a example.com/for-sale/stuff1?sortby=umph-value etc example.com/for-sale/stuff1 **has the same result as **example.com/for-sale/stuff1?sortby=date_added ( that is the default sort option ) similarly for stuff2, stuff3 and so on. I cant 301 these because these are relevant for users who come in to buy from the site. I can add a view all page and rel canonical to that but let us assume its not technically possible for the site and there are tens of thousands of items in each of the for-sale pages. So I split it up in to pages of x numbers and let us assume we have 50 pages to sort through. example.com/for-sale/stuff1?sortby=date_added&page=2 to ...page=50 example.com/for-sale/stuff1?sortby=price&page=2 to ...page=50 example.com/for-sale/stuff1?sortby=a-z&page=2 to ...page=50 example.com/for-sale/stuff1?sortby=z-a&page=2 to ...page=50 example.com/for-sale/stuff1?sortby=umph-value&page=2 to ...page=50 etc This is where the shit hits the fan. So now if I want to avoid duplicate issue and when it comes to page 30 of stuff1 sorted by date do I add rel canonical = example.com/for-sale/stuff1 rel next = example.com/for-sale/stuff1?sortby=date_added&page=31 rel prev = example.com/for-sale/stuff1?sortby=date_added&page=29 or rel canonical = example.com/for-sale/stuff1?sortby=date_added rel next = example.com/for-sale/stuff1?sortby=date_added&page=31 rel prev = example.com/for-sale/stuff1?sortby=date_added&page=29 or rel canonical = example.com/for-sale/stuff1 rel next = example.com/for-sale/stuff1?page=31 rel prev = example.com/for-sale/stuff1?page=29 or rel canonical = example.com/for-sale/stuff1?page=30 rel next = example.com/for-sale/stuff1?sortby=date_added&page=31 rel prev = example.com/for-sale/stuff1?sortby=date_added&page=29 or rel canonical = example.com/for-sale/stuff1?page=30 rel next = example.com/for-sale/stuff1?page=31 rel prev = example.com/for-sale/stuff1?page=29 None of this feels right to me . I am thinking of using GWT to ask G-bot not to crawl any of the sort parameters ( date_added, price, a-z, z-a, umph-value, and so on ) and use rel canonical = example.com/for-sale/stuff1?sortby=date_added&page=30 rel next = example.com/for-sale/stuff1?sortby=date_added&page=31 rel prev = example.com/for-sale/stuff1?sortby=date_added&page=29 My doubts about this is that , will the link value that goes in to the pages with parameters be consolidated when I choose to ignore them via URL Parameters in GWT ? what do you guys think ?
Technical SEO | | Saijo.George0 -
Rel Author Tag - Attributing Content to a Company
If the content is written by a corporation and cannot be attributed to a specific writer, yet we want to claim the authorship - can a logo be used instead of a headshot in the Google Profile? Researching the above, and found that its a NO, but it can be done somewhat through rel=publisher tag, which at present is not very useful. Any other thoughts?
Technical SEO | | yanaiguana1111 -
Rel = prev next AND canonical?
I have product category pages that correctly have the prev next but the moz crawl is giving me duplicate content errors. I would not think I also need to have canonical - but do I ?
Technical SEO | | JohnBerger0 -
How to set up a rel canonical in big commmerce?
I have no clue how to set this up in the Bigcommerce store platform
Technical SEO | | Firestarter-SEO0