Q and A: Which are preferable from a SEO perspective - absolute or relative links?
Dear Kalena...
Can you please tell me which are preferable from a SEO perspective - absolute or relative links?
Thanks,
Barney
Kalena's Answer:
Dear Barney
Let me start by defining absolute vs relative links for readers who aren't familiar with these terms.
An absolute link defines the precise location of a web page or file including the full domain. Below is an example of an absolute link:
A relative link assumes that the search engine spiders and browsers already know on which domain and sub-directory the current document is located, so a full URL is not specified. Below is an example of a relative link:
Note that the http://www is not included in a relative link. Also I've used square brackets to replace <> so I don't break the Blogger code.
There is no preferred option for SEO. In terms of search engine compatibility, it doesn't matter if you use absolute or relative links on your site, because most search engines automatically convert relative links into an absolute links anyway.
Some programmers like to use relative links because the shorter code can decrease a page's download time. I prefer to code in absolute links so there is less room for error when designing the site or referring to image files etc. Also, when you code in absolute links, you can publish part of the site to another domain (a new page for your client's site on your own test site for example), without the need to upload all the image files, CSS etc to make it load correctly. This is because all the files referenced refer to the actual domain where they sit, rather than the temporary domain location that they are being viewed on. This is convenient from a designer's perspective.
However you decide to link to files on your site, make sure you are consistent.
Can you please tell me which are preferable from a SEO perspective - absolute or relative links?
Thanks,
Barney
Kalena's Answer:
Dear Barney
Let me start by defining absolute vs relative links for readers who aren't familiar with these terms.
An absolute link defines the precise location of a web page or file including the full domain. Below is an example of an absolute link:
[a href="http://www.domain.com/subdirectory/page.html"] [/a]
A relative link assumes that the search engine spiders and browsers already know on which domain and sub-directory the current document is located, so a full URL is not specified. Below is an example of a relative link:
[a href="page.html"] [/a]
Note that the http://www is not included in a relative link. Also I've used square brackets to replace <> so I don't break the Blogger code.
There is no preferred option for SEO. In terms of search engine compatibility, it doesn't matter if you use absolute or relative links on your site, because most search engines automatically convert relative links into an absolute links anyway.
Some programmers like to use relative links because the shorter code can decrease a page's download time. I prefer to code in absolute links so there is less room for error when designing the site or referring to image files etc. Also, when you code in absolute links, you can publish part of the site to another domain (a new page for your client's site on your own test site for example), without the need to upload all the image files, CSS etc to make it load correctly. This is because all the files referenced refer to the actual domain where they sit, rather than the temporary domain location that they are being viewed on. This is convenient from a designer's perspective.
However you decide to link to files on your site, make sure you are consistent.
Labels: search engine optimization (seo)







1 Comments:
The only concern I would have in recommending coding in absolute links relates to domain name changes.
If you change your domain name your absolute links will all break.
Relative links will be unaffected.
In the corporate world, domains, and especially host names can and do change.
Just an FYI for your readers.
Post a Comment
<< Home