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
-
Rank regional homepages using canonicals and hreflangs
Here’s a situation I’ve been puzzling with for some time: The situation
Technical SEO | | dmduco
Please consider an international website targeting 3 regions. The real site has more regions, but I simplified the case for this question. screenshot1.png There is no default language. The content for each regional version is meant for that region only. The website.eu page is dynamic. When there is no region cookie, the page is identical to website.eu/nl/ (because Netherlands is the most important region) When there is a region cookie (set by a modal), there is a 302 redirect to the corresponding regional homepage What we want
We want regional Google to index the correct regional homepages (eg. website.eu/nl/ on google.nl), instead of website.eu.
Why? Because visitors surfing to website.eu sometimes tend to ignore the region modal and therefor browse the wrong version.
For this, I set up canonicals and hreflangs as described below: screenshot2.png The problem
It’s 40 days now since the above hreflangs and canonicals have been setup, but Google is still ranking website.eu instead of the regional homepages.
Search console’s report for website.eu: screenshot3.png Any ideas why Google doesn’t respect our canonical? Maybe I’m overlooking something in this setup (combination of hreflangs and canonicals might be confusing)? Should I remove the hreflangs on the dynamic page, because there is no self-referencing hreflang? Or maybe it’s because website.eu has gathered a lot of backlinks over the years, whereas the regional homepages have much less, which might be why Google chooses to ig nore the canonical signals? Or maybe it’s a matter of time and I just need to wait longer? Note: I’m aware the language subfolders (eg. /be_nl) are not according to Google’s recommendations. But I’ve seen similar setups (like adobe.com and apple.com) where the regional homepage is showing ok. Any help appreciated!0 -
# Tag - opacity and SEO impact
Hello,
Technical SEO | | Tiffany_Barn
I have a query animation 'fade-in-up' on my website: tiffanybarnard.com which moves the H1 tag slightly and fades it in from zero opacity to 1. Will this affect the SEO value of the H1 tag?
Thank you!0 -
Use of title tags on divs for SEO purposes
Hello community, I recently was asked by a client to analyze a website of a competitor. I did was he asked me to do but when I looked at the source code of the website I found this code: I changed the exact words into something for privacy reasons, but I never looked at a code like this.
Technical SEO | | JarnoNijzing
Using a div for an anchor I get but adding a title tag to the div? I never seen that before. Title tags on anchors, yes, using images in divs as background and then adding a title??? Does anyone have any experience with a code like this and if you do how does this impact rankings? Does it impact rankings at all and does anybody know of any correlation between the two? Looking forward for your responses. Regards Jarno0 -
Meta title Tag dilemma.... need help
Hey, Guys I have a dilemma that I cannot figure out how to solve. One thing that I have learned is that the meta tag is probably one of the most important factors of SEO. I work in the industry of real estate and we are located in a mid-sized market, Augusta, GA, which does not have a hugely competitive digital marketplace. So, I have told my web developer the changes that I want her to make to our major sub-domain pages on our website. I am anticipating that once she makes these changes which will allow me to make the necessary SEO changes to website, that we will see some good results. I have one dilemma that I can't figure out how to solve with the meta title tag. Check out our rental section: http://aubenrealty.com/rentals.cfm Now, click on any rental property and it will take you to that rental's page. Notice the page title " Auben Realty- real estate....." This is identical for every active and non-active property on our website. Every time we create a new property, this is what it spits out. Now, take it a step further and click on " Contact me about this property," and you will see the same page title. My dilemma is, " How do we fix this?" My assumption is that the best page title would be the address for each property( ex, 1322 Laurel Street, Augusta Ga 30904), right ? Is this some kind of simple coding adjustment?
Technical SEO | | AubbiefromAubenRealty0 -
What's the latest on Title Tags?
What is the latest on what Google is looking for? Keyword one, Keyword two? Sentences with the Keyword in them?
Technical SEO | | netviper0 -
Rel=author
Hi everyone, i'm trying to understand the rel=author thing for cotent, i need some clarification please. Firstly do you only use it for content on your site or can you have it for a guest post you have done on another domain which is not your own - linking to your author profile on your domain? Secondly implementing it, i understand it's 3 links: 1., Link on your content where the blog post is with a rel=author going to your domain authort page. 2., a link from your domain author page going to your google + profile. This is rel=me 3 a link on your google+ profile to your blog? if so how do i do this? i only have an option to edit about page and add recommended links? there is no 'contributor' section. I am UK profile also. Any help really appreciated, thanks guys.
Technical SEO | | pauledwards0 -
Image optimisation, alt and title tags
Is making the alt and title tags in an image the same bad for seo? Does anyone have any recommendations? any help much appreciated.
Technical SEO | | pauledwards0 -
Title tag same text as H1?
What is the group's opinion on whether or not the <title>tag should have the exact same text as the <h1> tag on the same page? Obviously both should contain the phrase that page is optimized for but is it better to have them be variants of each other, or both the same and maybe equal to the key phrase that page is optimized for? Thanks.</p> <p>Example:</p> <blockquote style="background: none repeat scroll 0% 0% #f7f7f7; padding-top: 5px; margin-left: 0px; padding-left: 2px; padding-bottom: 5px; white-space: nowrap; overflow-y: auto; font-family: monospace;"> <p>title: los angeles blue widgets</p> <p>h1: los angeles blue widgets</p> </blockquote> <p>Or,</p> <blockquote style="background: none repeat scroll 0% 0% #f7f7f7; padding-top: 5px; margin-left: 0px; padding-left: 2px; padding-bottom: 5px; white-space: nowrap; overflow-y: auto; font-family: monospace;"> <p>title: los angeles blue widgets</p> <p>h1: blue widgets in los angeles</p> </blockquote> <p>Where the page is trying to optimize for "los angeles blue widgets"</p></title>
Technical SEO | | scanlin0