Pergunta

  1. Is it Okey to do like the following for SEO purpose:<a href="index.php">home</a>, or do I need to do it like this:<a href="www.yoursite/index.php">home</a>?
  2. In each page of my website, do the links in navigation count as "internal links", why cannot I get the list of internal links in "Internal links" in Google Webmaster?
Foi útil?

Solução

There is no difference between absolute and relative path as search engine crawler will treat both in same manner.

But; when any one copy your link provided as absolute path, they can easily get the whole link and can share exact URL on their website.

Outras dicas

In short, you do not need to use absolute links to optimize for search engines. Search engine crawlers will be able to figure out the structure of your site. Using absolute paths is actually beneficial, because if you ever need or want to change your domains you will not have to hunt and peck over your entire site's codebase to resolve it.

Although it won't make a huge difference, if your're really worried about it you can use the canonical tag in your HTML head.

<html>
<head>
<title>This is my site</title>
<link rel="canonical" href="http://www.mydomain.org/mysite" />
</head>
<body>
</body>
</html>

There is no difference as far as SEO goes for using absolute vs. relative for internal linking. But if you are using absolute, you might see your own domain show up as a referrer in your analytics.

If you want to use relative paths, then use <base href=""> in your head ... see http://www.w3schools.com/tags/tag_base.asp

Here are some other related suggestions in regard to rel="canonical" SEO, and analytics:

1) Google, when indexing pages, ignores everything after the # in your URLs, so use # instead of ? ... Then, for your SEO purposes, Google will consider:

http://example.com/pagename.html and http://example.com/pagename.html#var1=FOO&var2=BAR to be the same page.

2) You can also set in the head of your pages:

<link rel="canonical" href="http://www.example.com/pagename.html" />

see: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

3) As far as reporting goes, in google analytics, they support use of # as query string delimiter, see: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiCampaignTracking#_gat.GA_Tracker_._setAllowAnchor

4) In your google analytics profile, you can also set it to exclude query string parameters. See: http://support.google.com/analytics/bin/answer.py?hl=en-GB&answer=1010249

I prefer method #1. All of my tracking URLs for campagins and all internal links and logic use # as the query string delimeter so I can maximize my link juice to the canonical domain (no www subdomain in my canonical) I set in .htaccess like this:

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

Here my suggestion would be to use either '/' or 'www.mysite.com' instead of appending index.php. Let everything resolve to your root domain. If both root domain name & index.php exists, it might create duplicate content problem.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top