Forum Moderators: open

Message Too Old, No Replies

Href links ..in full or not

         

juliejayne

9:01 am on Apr 28, 2005 (gmt 0)

10+ Year Member



OK, I am new to Website design. So my apologies for this noob question.

I have a lot of internal links on my pages, the original page making software always included the full address, ie "http://www.sitename.com/filename.html"

But now that I am tidying the pages up by hand, I am wondering do I really need the "http://www.sitename.com/" bit, since "filename.html" works just as well and saves some space.

Is there a rule that you should use the full address, or the relative address or does it not matter?

sifredi

9:11 am on Apr 28, 2005 (gmt 0)

10+ Year Member



I would prefer the relative address. Less markup = faster loading site.

juliejayne

9:20 am on Apr 28, 2005 (gmt 0)

10+ Year Member



Thanks, that was my thinking too. Unless anyone knows of a reason not to.

larryhatch

10:31 am on Apr 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are making links from one page on your site to another,
I would recommend FULL http:// links to web pages, and short links
to your images only.
There are several reasons, one of which is piracy. The small amount
of extra code will scarcely matter if you have content or images. - Larry

juliejayne

10:58 am on Apr 28, 2005 (gmt 0)

10+ Year Member



OK Larry, I said I was new.

What sort of piracy are we talking about, and how would full address links stop it?

larryhatch

11:12 am on Apr 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Julie: Nothing _stops_ piracy, but full links discourage it
a little, at least the dumber lazier pirates.
I refer to people so, er, challenged that they will copy your pages whole,
as is, and unedited. Editing requires (gasp!) mental effort on their part.
Somewhere in these pages I read about a dolt who copied a page off
somebody's site and left in all the links!
MOST of those links led right back to the rightful pages of the victim.

Full links might make it easier for search engines to find your other pages too.
A lot of us put the statement:
<BASE href="http://www.yoursite.com/"> right after the
<title yadda yadda> statement.
There are other benefits for that, see 302 redirect hijacking threads.

I use BOTH <BASE href, and full http:// links.
All my outgoing links are full http:// too.

I think I should let others chime in at this point. -Larry

bruhaha

12:41 pm on Apr 28, 2005 (gmt 0)

10+ Year Member



Nothing stops piracy, but full links discourage it
a little, at least the dumber lazier pirates

That's why I make sure I lock my car doors, even if I decide to leave it unattended with the windows wide open on a hot day. At least the dumber, lazier thieves might see that it's locked and not bother! ;)

bruhaha

12:47 pm on Apr 28, 2005 (gmt 0)

10+ Year Member



Full links might make it easier for search engines to find your other pages too.

I seriously (this time!) doubt it -- I don't know any search engine whose spider has any trouble following relative links to explore full sites. (In light of the widespread use of relative links, any SE that couldn't follow them would miss a lot and be at quite a competitive disadvantage.)

juliejayne

1:13 pm on Apr 28, 2005 (gmt 0)

10+ Year Member



Larry, thanks. That was just the information that I needed.

But why anyone should want to copy my pages, selling coffee, is a mystery. Still I know they are out there, and now I see your point, if they copy the page as is, all the links will still point back to me.

SeK612

5:13 pm on Apr 28, 2005 (gmt 0)

10+ Year Member



I tend to make sure my links are not in full and usually omit things like /index.htm leaving a link just pointing to the directory.

I was under the impression this was a better method of linking. I forget why (I think it was something to do with calls to the server being reduced) but have gotten into the habbit of doing it now.

Krapulator

6:12 am on Apr 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd go with the short relative links myself. As sifredi says, it makes for smaller and leaner pages.

I would not make decisions based on the "piracy issue" as if someone is going to steal your site/pages they will do it regardless of how you've coded your links.

larryhatch

6:28 am on Apr 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Julie: There are vacuum cleaner sites out there what would copy the
telephone book if it were online. - Larry

grandpa

6:46 am on Apr 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Julie, I'm with Larry on this one.

But why anyone should want to copy my pages

Why indeed? But they do, and will continue. Some fellow in Russia keeps stealing my Free Widgets page. Free!?! I keep taking it back every time I find his new page. There are lots of reasons to steal a page besides the actual content you have put on it. (He's stealing it because it happens to be number 1 right now, and that helps him get his page nearer the top.)

The few extra bytes you add to a page because you included the full reference is not worth worrying about. The argument for spiders can fall either way. Spiders will find your pages, that's what they do. I sleep a little easier knowing I gave the spider a full reference, and that my visitors will land on the page I created for them - no questions asked.

Stormfx

5:04 pm on Apr 29, 2005 (gmt 0)

10+ Year Member



As was mentioned, the only major difference is the size of your pages. If you're serving a fair margin of low bandwidth users, you might worry about it. If not, it won't be noticeable. Besides, the browser still requests the resource under that domain by calling the full domain, anyhow (normally). And even if the browser doesn't call the full domain, the server still checks it anyhow. So the local DNS call on the server is made requardless of what type of url is used. (normally...)

g1smd

11:25 am on May 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



An extra point or three:

Make sure you redirect non-www to www using a 301 redirect, to avoid serving duplicate content under multiple URLs.

If you link to an index page inside a folder, do not include the filename of the index file. Simply end the link with the folder name followed by a trailing / on it:
http://www.domain.com/folder/ or just /folder/