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
-
Weird Site is linking to our site and links appears to be broken
I have got a lot of weird links indexed from this page: http://kzs.uere.info/files/images/dining-table-and-2-upholstered-chairs.html When clicking the link it shows 404. Also, the spam score is huge. What do you guys suggest to do with this?
Intermediate & Advanced SEO | | Miniorek
Could it be done by somebody to get our rankings down or domain penalized? Best Regards
Mike & Alex0 -
SEO Title Versus Meta Description Tag
From an SEO perspective, is the title tag more important than the description tag? We use a set format for these tags on our real estate web site. The site contains 300 listings. Sample Title Tag:
Intermediate & Advanced SEO | | Kingalan1
Greenwich Village | Office Space Rental| 2300SF $9583/month Sample Description Tag:
Classic Greenwich Village office rental. Hardwood floors, 11' ceiling. 5 oversized windows. 24/7 attended lobby. Renovated common areas. Below market rent. Are we shooting ourselves in the foot by repeating the Square Footage and monthly rent amounts in the title tag? Should this tag be used for a short more descriptive terms so as to maximize the SEO benefit? Should these numbers be listed in the description tag? The listings are not heavily SEO optimized so I don't know whether this is really a non-issue.0 -
301 old site to new site?
I have client with an old site - www.bestfamilylawattorney.com - which had a lot of spammy links (and bad rankings). Instead of fixing those issues, we started a new URL - www.berenjifamilylaw.com - with new content and redesign. Should I do a 301 redirect from old to new domain? If the old site was being penalized, would a 301 transfer that penalty? I just want to make sure I don't end up hurting the new site after doing all the work to start fresh. Thanks.
Intermediate & Advanced SEO | | mrodriguez14400 -
Organic search data not representative of site Authority, need advice
Hi, I seeking some advice, I have an organic search issue, I would like to figure out if there is any reason why my site www.aatravel.co.za would not be doing well in the rankings? This domain is more powerful than a previous Domain we had, 51 versus 37 according to MOZ, but despite this it is not ranking nearly as well. There are a few things to consider. The domain was owned by us then got taken away about 3 years ago and then 301ed to a completely new site, then it was 404ed for about a year before we got it back, and now we have it back and have populated it with the same data as the less powerful Domain www.aaholidays.co.za. I believe that most of the AA Travel Authority comes from a stronger backlink profile. Why would this now 2 month after we reskinned and converted 301s back not be ranking as highly? Is there an issue with old site structure and google not passing through the 301 link juice from old pages that have links to the new ones(we have 301ed them)? Also I have 301ed the old aaholidays.co.za site to this one as the new home of AA Travel, that organic traffic was at about 8 000 visits a month, and the new site is at about 2 300. Has Google sandboxed the Domain for a certain period of time, or is there something else that may be the matter?
Intermediate & Advanced SEO | | ProsperoDigital0 -
Development site is live (and has indexed) alongside live site - what's the best course of action?
Hello Mozzers, I am undertaking a site audit and have just noticed that the developer has left the development site up and it has indexed. They 301d from pages on old site to equivalent pages on new site but seem to have allowed the development site to index, and they haven't switched off the development site. So would the best option be to redirect the development site pages to the homepage of the new site (there is no PR on dev site and there are no links incoming to dev site, so nothing much to lose...)? Or should I request equivalent to equivalent page redirection? Alternatively I can simply ask for the dev site to be switched off and the URLs removed via WMT, I guess... Thanks in advance for your help! 🙂
Intermediate & Advanced SEO | | McTaggart1 -
I need your brains please - client site dropped significantly in search since hummingbird
I need your support. I've been doing "SEO" for several years - but sticking to sustainable methods. No junk links Decent content Decent site etc The site is advisein.com and it was ranking well for several terms such as: best lsat prep best lsat preparation best lsat course etc. Also there are some youtube videos (with the google thumbnail) that were doing extremely well in search and even those dropped in the rankings. Can any of you tell if there are some glaring issues that I am missing that would make the website and youtube videos drop 30 - 40+ spots in SERP's over the past few months after dominating for the last 3 years? Thank you in advance and I welcome additional questions and any ides....
Intermediate & Advanced SEO | | Intergen0 -
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 -
What's the best way to manage content that is shared on two sites and keep both sites in search results?
I manage two sites that share some content. Currently we do not use a cross-domain canonical URL and allow both sites to be fully indexed. For business reasons, we want both sites to appear in results and need both to accumulate PR and other SEO/Social metrics. How can I manage the threat of duplicate content and still make sure business needs are met?
Intermediate & Advanced SEO | | BostonWright0