Relative Links

  • Unknown's avatar

    Can somebody possibly explain the value of using relative links vs absolute links when referencing other pages within my site?

    If a domain name change is being contemplated, or if one is thinking of switching to another host, is it better/safer to use relative internal links? And if so, how should they be formatted?

    Thanks very much to anybody who can help!

    Steve

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Absolute links in your site will cause pingbacks. Relative links won’t. Pingbacks can be useful if you are updating/expanding on information previously written about and you want your readers to see the link to the newer material.

    If you want to include relative links you simply leave off your site’s address from the link, so in your case http://splicenow.com/ and only leave the link to the Post/Page, such as /2010/11/04/does-no-controller-mean-more-control/

    Since you’ve already got domain mapping in place for your new domain, I don’t believe there will be any difference if you use the relative link or not, but will be happy to hear input from others with more experience than I do with domain mapping upgrades.

  • Unknown's avatar

    Thanks Jennifer and thanks for looking at my site and being so specific. I had an older mapped domain that I’ve had to let go and I want to remove all absolute links to that domain. (That is, links from within my site to other pages in the site.) I’m thinking that if they are relative links that they are safer if there is another name change or if I move my blog to another host. Would you agree with that?

    Also, is there any easy way to find those internal links, or do I just have to go through the posts and find them manually?

    And finally — I’m a bit confused about what you say about pingbacks. If somebody posts something about my blog, then they’d want to use an absolute link and that would cause a pingback, correct? But if I’m linking to my own site? Not sure I understand.

    Thanks again for your help,
    Steve

  • Unknown's avatar

    As long as you maintain the same domain name, it doesn’t matter who you host with.

    As far as finding the old links, if this were an external site I’d suggest a link checker. Not certain how well they work on a site like WordPress.com. Perhaps someone else can make a suggestion here…

    Sorry if I wasn’t clear above. What I was meant is a “self-ping”. It will happen any time you link from what you are writing to another post or page within your site. With the new ability to link internally recently added in the Visual Editor, the default choice is an absolute link. I’m not certain why it would be preferable to a relative link. (I just added a comment to the WP.com announcement asking about this.) I could see it causing potential problems if you buy a Domain upgrade or move off WordPress.com to your own domain/webhost, especially without the Redirect upgrade.

  • Unknown's avatar

    Thanks. Very helpful. I wish the Visual Editor gave you an option for a relative link. They’re easy to create, but you have to know the option is there. I only discovered it by accident. Somehow I had created some relative links inadvertently and when I was searching for internal links to the old domain I found them.

    If anybody knows of a link checker that will work on a wordpress.com site, please let me know.

    Thanks again,
    Steve

  • Unknown's avatar
  • Unknown's avatar

    Just rambling here, but with Joomla, all internal links you put in go relative, no matter if you put in absolute or not. Any internal link added to an article is relative. What happens though, is that Joomla turns those relative links into absolute when serving up HTML to browsers and in feeds.

  • The topic ‘Relative Links’ is closed to new replies.