Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Absolute vs Relative Links

Discussion in 'Search Engine Optimization' started by DanielEZPZ, May 19, 2008.

  1. DanielEZPZ

    DanielEZPZ New Member Webmaster

    I'm in the process of redoing the top-menu of my website and wondered if using absolute links would be good or bad for SEO.

    I Googled for a few articles and everyone seems to have differing opinions on the best way.

    The positive points for using relative links means the code is cleaner and download times will be faster (negligible)

    The positive points for using absolute links is that there's a much smaller chance of getting the link wrong and spiders being sent to a 404 page.

    What are your thoughts on this? I know there are a few experts here :)

  2. Gorkfu

    Gorkfu New Member Webmaster

    I use all absolute links in my sites. Mainly because of all the htaccess rewrites that I have. They can make it annoying if I used relative links. You know using the ../ etc to go back directories can be a bit tedious after awhile.

    I just use a simple php variable to populate my absolute link like this.

    <?php $home = "http://www.site.com/"?>

    Then it would be plugged in like this.

    <a href="<?php echo $home; ?>document-name.php">My Link</a>

    Another good thing about this is if you have one header file included for your entire site you would put the variable there. Then if you have a test server just change the $home attrbiute to localhost or your test server's IP.

    I guess that went a bit off topic.

    I really don't think it makes a bit of difference. Google, msn, yahoo etc, know if the page is yours or not when using relative or absolute links. I don't really think this will have any weight against SEO. Most people do relative links to save on page load times. Although my method could also save on page load times.

    Although, your domain name would appear several times in your code when using absolute links, therefore I would think that may increase your SEO for what ever keywords are in your domain name.
  3. Bagi Zoltán

    Bagi Zoltán Boss Cart consultant Webmaster

    I tend to use absolute links, because if the content is stolen it might cause some extra backlinks.

Featured Resources (View All)

Share This Page