Adding Meta Languange tag to xhtml site - coding help needed
-
I've had my site dinged by Google and feel it's likely several quality issues and I'm hunting down these issues.
One of Bing's Webmaster SEO tools said my xhtml pages (which were built in 2007) are missing Meta Language and suggested adding tag in the or on the html tag.
Wanting to "not mess anything up" and validate correctly, I read in **W3C's site and it said: ** "Always add a lang attribute to the html tag to set the default language of your page. If this is XHTML 1.x you should also use the xml:lang attribute (with the same value). Do not use the meta element with http-equiv set to Content-Language."
My current html leads like:
QUESTION:
I'm confused on how to add the Meta Language to my website given my current coding as I"m not a coder.Can you suggest if I should add this content-language info, and if so, what is the best way to do so, considering valid w3c markup for my document type?
Thank you!!!
Michelle -
thank you!
-
Yeah, I don't think you'll go wrong with "en". Glad to help, hope that answers your question
-
Thanks again George. So, I guess "en" or "en-us" is ok. Most of our customers are in the US by far, but we also have a smaller percent in Australia, Canada and the UK. But they all speak English.
That being said, maybe "en" is best?
Michelle
-
At least with Google, I doubt it makes a difference unless there are multiple languages on a page. If you use Chrome you'll see it auto-detects the language and offers to translate. It may only rank the page in a specific country or locale though. If you're aiming at Spanish speakers in the UK, it may be a little different.
-
Hi Michelle, "ll-cc" stands for "language-countrycode". So in the case of English, you can use "en-us" for English United States or "en-gb" for British English. I don't believe case matters (I have seen "en-US" and "en-GB" used too).
For your question, yes you can use:
You could also use:
Either one will work fine :). Which language are you targeting?
Here is some more reading from w3.org that seems more up-to-date, though I think you would be fine using one of the above methods.
-
The Bing Webmaster Central article where they discuss how to set the language for your pages is here.
-
Hi George,
Thanks for your prompt reply - and I agree - I'm sure this isn't a big factor, but when finding reports saying things are "wrong" - I'm trying to fix them for overall improvement.I noticed w3c says: Always add a lang attribute to the html tag to set the default language of your page. If this is XHTML 1.x you should also use the xml:lang attribute (with the same value).
So, is it best practice to add it (xml:lang) to this tag you suggested (is applicable to my document)?
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">And is "en" preferred over "ll-cc"?
Thanks again,
Michelle -
This is likely what you are looking for, but I don't think this is causing you any SEO problems.
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
-
My sites are not mooving why?
i have three local sites in Dubai. my second site is on page three. i didn't go for any guest post yet but for a long time with all improvement, It didn't move a bit. unable to understand the adhesivity of page three. lol any suggestion site 1- https://www.desertsafaritour.ae site 2- https://www.arabiannightsafari.com site3- https://www.uaedesertsafari.com any expert suggestion or any guideline by moz expert www.desertsafaritour.ae
Intermediate & Advanced SEO | | faisalkiani0 -
Rankings drop after https migration [Need urgent help]
hey hi guys, i have lost all my organic traffic and in need of urgent help. Plz i need all your SEO expertise. My website is: makemoneyadultcontent.com (before judging me, let me tell you that i have been in adult industry for almost 7 years now and hence this blog was a way to pass my knowledge to everyone who is looking for it) Recently i saw that moving to HTTPS will benefit my site. I did not knew much about technical details of moving to https. My hosting was on siteground, and they have a button which you can press and your website will then be served through https. So i did that. Nothing else was done. this was done on 13th or 14th of june For the next few weeks here is my analytics (image attached) : As you can see the traffic fluctuated and finally i lost everything on 29th june. When i researched more, i found out that you need to follow many steps in order to move to HTTPS. So i followed this guide and completed all the steps: https://www.keycdn.com/blog/http-to-https/ (also checked many other guides and tried to complete all the steps mentioned) Everyone said that the rankings will recover in one week, but now it has been more than 17 days and still the rankings have not improved. My articles are indexed as i can see it using site:makemoneyadultcontent.com but none of them are ranking for the keywords that i was ranking earlier. i have submitted the sitemap in google webmaster and around 166 (out of 218) pages are indexed. Here are few more images to help my case: plz plz help me what i can do to get my website traffic back. i have spent a lot of time and effort in building this site, cant see it die a slow death like this one. 8Wa8c [http ahref](http ahref) D42xw sAd9E
Intermediate & Advanced SEO | | akki910 -
Need to update Google Search Console profile for http to https change. Will a "change of address" option suffice or do we need to create a new GSC profile?
In the past I have seen most clients create new Google Search Profile when they update to a https URL. However a colleague of mine asked if just updating the change of address option will suffice https://support.google.com/webmasters/answer/83106. Would it be best to just update the change of address for the Google Search Console profile to keep the data seamless? Thanks
Intermediate & Advanced SEO | | RosemaryB0 -
Please help need experienced eyes
We own discount banner printing and we are trying to rank 1 for pvc banners or vinyl banners and cannot understand for example how the below is correct, we did suffer a link penalty years ago but we fixed this and the domain has some good links (more and better quality than the sites above us) and cannot understand how we rank below most of the sites above us? If we type on for example pvc banners we get http://www.bannershop.co.uk/cats/pvc_banners.htm https://www.hfe-signs.co.uk/banners.php http://bannerprintingandroid.co.uk/pvc-banners/ http://www.discountbannerprinting.co.uk/banners/vinyl-pvc-banners.html (our website) And if we type in vinyl banners we get http://www.vistaprint.co.uk/banners.aspx http://www.bigvaluebanners.co.uk/ http://vinylbannersprinting.co.uk/ http://www.discountdisplays.co.uk/html/vinyl_banners.html https://www.buildasign.co.uk/banners http://www.monkey-print.com/outdoor banners/budget-outdoor-banners http://www.discountbannerprinting.co.uk/banners/vinyl-pvc-banners.html (Our website)
Intermediate & Advanced SEO | | BobAnderson0 -
Large Site - Complete Site URL Change and How to Preserver Organic Rankings/Traffic
Hello Community, What is your experience with site redesign when it comes to preserving the traffic? If a large enterprise website has to go through a site-wide enhancement (resulting in change of all URLs and partial content), what do you expect from Organic rankings and traffic? I assume we will experience a period that Google needs to "re-orientate" itself with the new site, if so, do you have similar experience and tips on how to minimize the traffic loss? Thanks
Intermediate & Advanced SEO | | b.digi0 -
Need help for improving SEO App?
Please refer our guru99 https://play.google.com/store/apps/details?id=com.vector.guru99&hl=en We have tons of free materials related to SAP in the app. The problem we are facing is we do not rank for terms like SAP or SAP tutorial and discovery is an issue I have searched over the internet and found no concrete solution. Can you experts help ?
Intermediate & Advanced SEO | | Chirag7530 -
Can this site be optimised?
I have been told that because of the technology this site was developed with it cannot be changed for example urls title and meta tags cannot be changed. why is that and what other types of sites also cannot be changed. http://www.alliedpickfords.com/Pages/Landing.aspx For example i have been told alot of online stores cannot be optimised because the urls change every time some one goes to the page therefor you cant lionk to a certain page is that true and what is the way around it if any.
Intermediate & Advanced SEO | | duncan2740 -
Social Signals...I Need More
Hi, Having used the Open Site Explorer (page specific metrics) tool I've realized I'm lacking in the Social Signals area...I have only 1 tweet and ZERO for everything else (Facebook shares, Likes, Google +1 etc). So I have 2 quesitons: How can I get more social signals (is there a service I can use to do it)? How long will the new social signals take to appear in the Open Site Explorer information? I've just paid someone on Fiverr.com to share my website link on his Facebook account, to tweet it, and also to use PingFM... Any other ideas would be GREAT - I can see this is a real weakness for my websites... Thanks, James
Intermediate & Advanced SEO | | James10