Reputation: 1
Will using the following code, give me some SEO problems? My Google rank dropped when I started using it.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="refresh" content="0;document.location" />
</head>
<body>
<p></p>
<!--?xml version="1.0" encoding="UTF-8"?-->
<p><link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /></p>
<title></title>
<script language="javascript" type="text/javascript">// <![CDATA[
if (screen.width <= 699) {
document.location = "http://mobilesite";
}
else{
document.location.href = "http://desktopsite"
}
// ]]></script>
</body>
</html>
Upvotes: 0
Views: 239
Reputation: 13080
I think you need to learn HTML structuring first and foremost.
The favicon include and title should always be in the <head>
containment.
Not sure why you have an XML declaration in their either.
You might as well use the HTML5 doctype as well <!doctype html>
.
Regarding the SEO issue. Content is king. Search engines mainly go on content contained within the page. Now I'm not sure how your JS will affect this as the spiders and robots that crawl the page don't run JavaScript (I could be wrong, hopefully someone will correct me if that's the case).
Upvotes: 1