SEO Wise: Is href="/" as good as href="http://www.mydomain.com/" ?

Discussion in 'Search Engine Optimization' started by AKnogood, Aug 26, 2009.

  1. #1
    I've been optimizing my website html code recently and I'm now at the point where I want to reduce the size of my css and html files as much as possible for quicker loading and better text to code ratio.

    I was wondering in my html code for internal links if I use href="/" instead of the full url href="http://www.mydomain.com/" is it as good for SEO?

    I guess its the same if I use href="/subpage/subpage.html" instead of href="http://www.mydomain.com/subpage/subpage.html"?

    Thanks!
    Vincent
     
    AKnogood, Aug 26, 2009 IP
  2. cyberblogteam

    cyberblogteam Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    From your example, going to subpage.html from your root directory you can use:

    href="folder/subpage.html" which means you don't need to put a "/" in front of folder - it won't work.

    And if, for example, you are on subpage.html (which is inside a folder)and want to link to a page in the root directory (outside the folder) you just use:

    href="../index.html"

    without typing your whole domain, not even the folder name, but you must specify the page in the root directory (index.html in the example).

    Now, if your subpage.html is two pages deep, e.g. folder1/folder2/subpage.html, link to index.html using:

    href="../../index.html"

    I hope this helps.
     
    Last edited: Aug 26, 2009
    cyberblogteam, Aug 26, 2009 IP
  3. AKnogood

    AKnogood Active Member

    Messages:
    244
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Thanks for the clarification.

    But let say in my header logo I want to add a link to my frontpage (like the Digital Point logo up here). If I use href="/" with anchor "Digital Point" will it be as good as if i used href="http://www.digitalpoint.com/" with the same anchor?

    Is the second one stronger SEO wise? I mean when a search engine crawls my page and sees href="/" do they all know that it's a link to my front page?
     
    AKnogood, Aug 26, 2009 IP
  4. cyberblogteam

    cyberblogteam Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes, it will be as good as using the full domain URL.
     
    Last edited: Aug 26, 2009
    cyberblogteam, Aug 26, 2009 IP
  5. AKnogood

    AKnogood Active Member

    Messages:
    244
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Good to know, thanks again!
     
    AKnogood, Aug 26, 2009 IP
  6. dulcificum

    dulcificum Active Member

    Messages:
    535
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    68
    #6
    Yeah, definitely exactly the same. Same PR sculpting, same link juice. Go for it.
     
    dulcificum, Aug 26, 2009 IP
  7. Canonical

    Canonical Well-Known Member

    Messages:
    2,223
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    110
    #7
    Yes "/subfolder/subpage.html" is the same as "http://www.example.com/subfolder/subpage.html".

    The key is that you either want to use fully qualified URLs like "http://www.example.com/subfolder/subpage.html" or root relative URLs like "/subfolder/subpage.html" (root relative meaning the relative URL always starts with a '/').

    Avoid using folder relative urls in HREF attributes like "../subfolder/subpage.html" or "../../xxx/yyy/zzz.html" or "./subfolder/x.html".
     
    Canonical, Aug 26, 2009 IP
  8. ipr22

    ipr22 Peon

    Messages:
    113
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Same thing, but you're more prone to making mistakes in the coding. By the way, using full paths in PHP if faster.
     
    ipr22, Aug 26, 2009 IP
  9. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Just to throw this out, I would use the entire url. This way, in case you get your content scrapped by another site, you get the links back instead of having those links juts point to their site.
     
    theapparatus, Aug 26, 2009 IP
  10. HighRankingSEO

    HighRankingSEO Well-Known Member

    Messages:
    423
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    125
    #10
    Full paths are the way to go IMO...They are both the same in engines eyes, relative and full...but the reason I ALWAYS use full path is so when people send their bots out to scrape content, they link back to my site :) ...Just fun stuff right there. But seriously, it really doesn't matter...I alwasy advise to use absolute URL's instead of relative. Some popular CMS's actually have the option to edit urls with relative and they will append the aboslute path....so you type images/whatever.png and the good folks that wrote the cms will have it automatically throw it up like http://www.whateverishere.com/images/whatever.png
     
    HighRankingSEO, Aug 26, 2009 IP
  11. willybfriendly

    willybfriendly Peon

    Messages:
    700
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I always use the full path. Less chance for error or ambiguity.
     
    willybfriendly, Aug 26, 2009 IP
  12. karpok

    karpok Active Member

    Messages:
    325
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #12
    I think http://www.mydomain.com/ is good, seo wise.
     
    karpok, Aug 26, 2009 IP
  13. Blue Star Ent.

    Blue Star Ent. Well-Known Member

    Messages:
    1,989
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    160
    #13
    Is Joomla one of those CMS's that "appends the absolute path" ?




     
    Blue Star Ent., Aug 27, 2009 IP
  14. willybfriendly

    willybfriendly Peon

    Messages:
    700
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Depends on how you have it (and any extensions) configured.
     
    willybfriendly, Aug 27, 2009 IP