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.
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
-
I need help in doing Local SEO
Hey guys I hope everyone is doing well. I am new to SEO world and I want to do local SEO for one of my clients. The issue is I do not know how to do Local SEO at all or where to even start. I would appreciate it if anyone could help me or give me an article or a course to learn how to do it. Main question The thing that I want to do is that, I want my website to show up in top 3 google map results for different locations(which there is one actual location). For example I want to show up for
Intermediate & Advanced SEO | | seopack.org.ofici3
online clothing store in new york
online clothing store in los angeles or... Let's assume that we can ship our product to every other cities. So I hope I could deliver what I mean. I'd appreciate it if you could answer me with practical solutions.0 -
Need Help - Lost 75% Of Traffic Since May 2018
Sorry to go in-depth here, but want to give all available information. We went live late April 2018 with our two websites in Shopify (moved from Magento, same admin, different storeviews...which we find later to cause some issues). Both of these websites sell close to the same products (we purchased a competitor about 5 years ago, which is why we have two). The nice thing is that they do almost identical amounts in sales. They have done very well for years, especially in the last two years. Well, the core algo update around May 22nd-24th 2018 happened and wiped out about 65% of our Google traffic for one website (MySupplementStore.com). And this latest update, wiped out another 20%. I couldn't figure out why this would have happened, because we were very cautious about keeping things separate, unique descriptions etc. So I did some digging and this is what I found: The reviews we migrated over from Magento somehow were combined and added to both websites. This is something I didn't notice. I had this resolved a month ago so that each site's reviews are now only on that website. Our blog section was duplicated across both websites during the migration. Again, something I didn't notice, as we have close to over 1,000 blog posts per site. This was resolved two weeks ago. As I was looking more, I found that the last 6 months, a person working for us (for 3 years), started writing descriptions and pasting them on both websites, instead of making them unique to each website. I trusted her for years, but I think she just got lazy. She quit about a month before the migration as well. We are currently working on this, but its been taking awhile because we have over 5,000 products on each site and have no idea which ones are duplicates. I did also notice: Site very slow when checking site speed tools. Working on that this week. When I take snippets of text or do searches, many times it shows up in omitted results. No messages in Google Webmaster Tools So the question is... Do you think it is the duplicate content issues that caused the drop? Our other site is Best Price Nutrition, which didn't see a big drop at all during that update. If not, any other ideas why?
Intermediate & Advanced SEO | | vetofunk0 -
Google Adding Wrong Location to Title Tag on Multi-Branch Business Homepage
We're a business with 5 separate locations across 5 cities in Upstate NY. While doing some visual ad previews in the adwords interface I noticed that Google is altering my title tag and adding the word "Rochester" to the end of it, cutting short my designated title tag. Rochester is the location of our headquarters so not a big deal for 1/5th of our customers. But to my dismay, the same thing is happening when searching from the geo locations of my other branches. So when searching for my business in Buffalo (we have a physical address in Buffalo), the title tag in the results still says our company name and "Rochester". This of course is likely leading to confusion and actively harming our organic CTR in our branch locations. This is happening in all of the remaining 4 branch locations. I'm at a loss, I tried lengthening the title tag but it still gets cut off. The term Rochester appears (as do the other branch locations) in my meta description for the homepage as well as in the text of the page itself. I haven't gone so far as to remove that yet and hopefully don't have to. Does anyone have any ideas? Thank you in advance!
Intermediate & Advanced SEO | | Doylejg30 -
Not alt tags but Title and description Meta: My designer's answer.
Hello! I was busy doing lots of key wording for my images which I hate and notices that when viewed in source code, the different places I inputed information translated into Title and Description meta tags but NO alt tags. As I'm a a photographer, it's really important to me that I make the most of my images to get increased traffic so I challenged the people behind my website about it. This is their response to the question: "We all know how important the alt tags are for image SEO so why does
Intermediate & Advanced SEO | | IoanSaid
the design allows Title, Description and Keyword image tags but not alt
tags?" Unfortunately, there is no way to add an alt tag and title tag specifically to an image display page. However, as you have pointed out here, we use other elements that essentially accomplish the same thing. Each image display page does have its own page title and meta description, as you have also noticed. For the title, we use the IPTC Headline field (if there is no headline, then we use IPTC Title, and if there is no title, then we go to file name), and for the meta description, we use both the IPTC caption as well as the keywords - so all of that information is embedded on the image display page with the image itself and search engines can index this content. Alt Text data intends to given contextual information to search engines when they crawl your site, and the IPTC metadata that shows along with your images, does this as well." What is your opinion on that answer?0 -
Site rankings steadily decreasing - do I need to remove links?
Since mid-April, our ranking have been steadily declining. Our two main keywords are 'nuts and bolts' and 'bolts and nuts'. 'nuts and bolts' dropped from 7th to 46th in May and has recovered slightly to 28th, and 'bolts and nuts' moved from 7th to 16th, and is today 24th. Ranking on keywords we specialise in have fared better, but they're fairly niche. 'bsw bolts' has moved from 2nd to 4th, and 'imperial bolts' has moved from 1st to 4th. I think my link profile is the issue. I don't think we've been penalised by Penguin directly (I may be wrong, I don't think we'd be page 2 on such a competitive term as 'bolts and nuts' after Penguin if we had been penalised.), but I think what's happened is that sites that link to us have been penalised, resulting in a knock on effect. Does that sound right? Here's my link profile: <a rel="nofollow" target="_blank">http://www.opensiteexplorer.org/links?site=www.thomassmithfasteners.com</a> I've been slowly building relevant links with prospective customers and kept up a very basic social media profile - just the odd blog post and sharing on Facebook and Twitter. Do I need to delete all the directory links? We do have links from directories that don't look fantastic, more are shown in Webmaster Tools than are listed here. Some of the directories no longer seem to exist, I take it I don't need to do anything and Google will catch up in those cases. Should I attempt to remove (or disavow) all links with names like best-directory etc? Or should I just concentrate on building better links? I'm not sure where to start! Any advice is greatly appreciated. Best Regards, Stephen
Intermediate & Advanced SEO | | stephenshone0 -
.htaccess code ?
What is the code to redirect www.xyz.com/abc where abc is a folder to www.xyz.com/abc.html
Intermediate & Advanced SEO | | seoug_20050 -
Proper use and coding of rel = "canonical" tag
I'm working on a site that has pages for many wedding vendors. There are essentially 3 variations of the page for each vendor with only slightly different content, so they're showing up as "duplicate content" in my SEOmoz Campaign. Here's an example of the 3 variations: http://www.weddingreportsma.com/MA-wedding.cfm/vendorID/4161 http://www.weddingreportsma.com/MA-wedding.cfm?vendorID=4161&action=messageWrite http://www.weddingreportsma.com/MA-wedding.cfm?vendorID=4161&action=writeReview Because of this, we placed a rel="canoncial" tag in the second 2 pages to try to fix the problem. However, the coding does not seem to validate in the w3 html validator. I can't say I understand html well enough to understand the error the validator is pointing out. We also added a the following to the second 2 types of pages <meta name="robots" content="noindex"> Am I employing this tag correctly in this case? Here is a snippet of the code below. <html> <head> <title>Reviews on Astonishing Event, Inc from Somerset MAtitle> <link rel="stylesheet" type="text/css" href="[/includes/style.css](view-source:http://www.weddingreportsma.com/includes/style.css)"> <link href="[http://www.weddingreportsma.com/MA-wedding.cfm/vendorID/4161](view-source:http://www.weddingreportsma.com/MA-wedding.cfm/vendorID/4161)" rel="canonical" /> <meta name="robots" content="noindex">
Intermediate & Advanced SEO | | jeffreytrull1
<meta name="keywords" content="Astonishing Event, Inc, Somerset Massachusetts, Massachusetts Wedding Wedding Planners Directory, Massachusetts weddings, wedding Massachusetts ">
<meta name="description" content="Get information and read reviews on Astonishing Event, Inc from Somerset MA. Astonishing Event, Inc appears in the directory of Somerset MA wedding Wedding Planners on WeddingReportsMA.com."> <script src="[http://www.google-analytics.com/urchin.js](view-source:http://www.google-analytics.com/urchin.js)" type="text/javascript">script> <script type="text/javascript"> _uacct = "UA-173959-2"; urchinTracker(); script> head>0 -
Have completed keyword analysis and on page optimization. What else can I do to help improve SERP ranking besides adding authoritative links?
Looking for concrete ways to continue to improve SERP results. thanks
Intermediate & Advanced SEO | | casper4340