Welcome to WebmasterWorld Guest from 54.144.243.34

Forum Moderators: incrediBILL

doctype question for xhtml

   
3:51 am on Sep 30, 2011 (gmt 0)

10+ Year Member



I have always used the following as mytemplate per say :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>title</title>
<meta name="keywords" content="keys" />
<meta name="description" content="desc" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
</head>

----

Is it necessary or recommended to change to <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">?

The pages are all in english language and I do not want to limit it... in other words I would like the entire world to be able to view the pages.

Second question related to this is one .co.uk site I have which is also written in english of course, but I would like to limit it to the UK only... it seems that eventhough it is a .co.uk it does not appear to show in uk engines.
4:55 am on Sep 30, 2011 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



1. The lang attribute does not limit country, it only describes the language of the content.

2. There's nothing you can do in HTML about the second issue. Search engines today assume that a ccTLD (country-code Top Level Domain) like .co.uk is a UK targeted website. Even in Google Webmaster Tools, there will be no option to choose a different geographic target.
5:06 am on Sep 30, 2011 (gmt 0)

10+ Year Member



Gotcha... so is it 'bad' that I have :

<html xmlns="http://www.w3.org/1999/xhtml">

and not specifying the language there?
6:00 am on Sep 30, 2011 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Not really "bad" - search engines can recognize the language of the document without seeing the declaration.
6:44 am on Sep 30, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I've always declared content type and content language before the title and meta description elements. I've not use the meta keywords element for a nearly a decade now.

Do you really need XHTML? I have always used HTML 4.01. You should be looking at HTML 5 right about now.
8:40 am on Sep 30, 2011 (gmt 0)

10+ Year Member



Well I find that I can do everything I need in XHTML strict without the hassles of worrying about it showing correctly in this browser or that browser for the most part (css, etc aside) so that is what I have been and plan to stick to.
2:29 pm on Oct 1, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



tedster: 2. There's nothing you can do in HTML about the second issue. Search engines today assume that a ccTLD (country-code Top Level Domain) like .co.uk is a UK targeted website. Even in Google Webmaster Tools, there will be no option to choose a different geographic target.


Are you saying that users from outside the UK are less likely to find a co.uk site via the search engines purely because of the TLD? Assuming the site content is completely universal and not country specific in any way (apart from being language specific).
4:54 pm on Oct 1, 2011 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If you have a .co.uk site it will automatically be targeted to the UK. And yes - users outside the UK will definitely have less exposure to a .co.uk domain via search. There can be some if the site grows into a real popular place internationally through some mechanism or other, but it's almost always a slow go.

The question was "I would like to limit it to the UK only", which is sort of the reverse. I don't know of any way to limit it either, at least not through the HTML or through search engine input.

The fact that this site "it does not appear to show in uk engines" could point to many things - technical problems with the code, the server, lack of backlinks, DNS issues, malware... who knows what else.

But that's almost never an HTML issue unless the source code is just plain impenetrable. That said, do make sure you haven't accidentally block crawling via robots.txt. robots meta tags or incorrect canonical link tags. And some hackers have been known to intentionally create these kind of obstacles on a site, cloaking their dirty work so that only the search engine sees it.

To check for this kind of hacking, set up Google WebmasterTools and use their "Fetch as googlebot" tool for a sampling of your pages.
10:06 am on Oct 3, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



It would seem that if you search via google.com (as opposed to google.co.uk or some other country specific google search) then you are not subject to the same country restriction during search.

It has been suggested that, "the effect [of geotargeting] is relatively small versus other, more basic factors like the actual content of your pages." (Reference [webmasters.stackexchange.com])

If you have a generic TLD (.com, .org, ...) then in Google Webmaster Tools you can choose to target a specific country if you wish. But as tedster states, a ccTLD will automatically be targeted to that country and this cannot be changed.

More information in Google Webmaster Tools - Geotargeting
[google.com...]
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month