hi everyone. quick question. What is the proper HTML code when linking internally? I mean, for example, is: <a href="index.html">home</a> better than <a href="http://mysite.com/index.html">home</a> ? does it matter? tnx
<a href="http://mysite.com/index.html">home</a> this is the right code when you are placing you are using anchor text.
Use descriptive anchor text for all your text links. Most search engines consider anchor text of links when ranking pages. Link titles are like alt text for text links. Try to have keywords in the title and anchor text. Here's an example for internal linking: Syntax: <a href="page.html" title="This is a link title.">this link</a> For External or Outbound Links you can go with "Alvis" <a href="http://mysite.com/index.html">home</a> this is the right code when you are placing you are using anchor text.
Actually google advises to link using the full url(http+site+page) instead of just page call only internally(I would place examples but I'm new around here so it does not allow me to post links yet). It makes sense for example in the case if you copy the file elsewhere it will still work.
As mentioned previously, search engines prefer absolute URLs (i.e. the URL including HTTP and domain name), because these are easier for them to crawl and get the hang of the structure of your website. Most web developers, however, prefer to use relative URLs (i.e. the URL excluding HTTP and domain name), because this makes your web pages easier to maintain (less links need to be changed when the file is moved from one directory/location to another) and because this slightly reduces the file size. It is not mandatory to use absolute URLs, but if you want your website to be SEO friendly then you should use absolute URLs in combination with a proper description of the title attribute and anchor text, and use the rel attribute. For example: <a href="http://mysite.com/index.html" title="Return to the homepage" rel=â€startâ€>home</a>
You can use href="index.html", href="/index.html" or href="full URL". There is no difference for search engines.
Silly me... I should've checked DP's SEO FAQ first. Should I use relative links or absolute links? Absolute links. It is recommended by Google as it is possible for crawlers to miss some relative links.
Erm actually my advise is never link to the index file as it gets treated as a different page to the domain name alone then, which is not good for a few reasons. <a href="http://www.mysite.com/">Home</a> Code (markup): Works much better. As far as absolute or relative absolute is better for SE spiders and incase people copy content from your site, at least you have links that will work depending on how they copy the content.
And if your worried about people copying your content put something like bhkqitttl in http://www.google.com/search?hl=en&q=bhkqitttl&btnG=Google+Search and link a period in your article to your homepage.