Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
Related Forum Posts
  1. old address redirects and link building (In: Directories & Link Building)
Featured Web Site Template

Hundreds More at Free Site Templates.com!

Web Site Partners
Sponsored Links
Jet City Software
 
Whos Here ?
Reflects user activity within the last 5 minutes
Member Message

friendlyfrank
Joined: Sep 02, 2006
# Posts: 305

View the profile for friendlyfrank Send friendlyfrank a private message

Posted: 03/08/2008 12:54 pm
Edit Message Delete Message Reply to this message

My site is interlinked using shortlinks for internal pages.. eg: page.html , page2.html. Does it really matter or should all interlinking be done with a full domain name followed by the page name ?



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10303

View the profile for g1smd Send g1smd a private message

Posted: 03/08/2008 01:33 pm
Edit Message Delete Message Reply to this message

Don't use "page.html", use the full path like "/whatever/page.html" beginning with a "/" that is.

Add the domain name if you want, or save bandwidth by using the <base> tag in the page header instead.



friendlyfrank
Joined: Sep 02, 2006
# Posts: 305

View the profile for friendlyfrank Send friendlyfrank a private message

Posted: 03/08/2008 05:11 pm
Edit Message Delete Message Reply to this message

thank so much.



freeflyer
Joined: Aug 06, 2007
# Posts: 207

View the profile for freeflyer Send freeflyer a private message

Posted: 03/25/2008 08:21 am
Edit Message Delete Message Reply to this message

ffs .. thats just the way of pointing to the link with regards to paths and directories, and has nothing to do with his original question.

What he was asking is that is a link better with the domain in front of it or without.. which of course you'd know, is better with, if possible.



Dinkar
Staff
Joined: Aug 12, 2001
# Posts: 4369

View the profile for Dinkar Send Dinkar a private message

Posted: 03/25/2008 08:40 am
Edit Message Delete Message Reply to this message

Choose whatever version you may like; but always follow these two rules -

1. Use absolute path (full link) for all links in your homepage.

2. Use absolute path for your HOME / Logo link in all pages. Always linked to your domain name only. Don't use your index / homepage file name

Example:
Use : http://www.searchengineforums.com
Don't use : http://www.searchengineforums.com/index.html

You may use short link (relative path) or full link (absolute path) for other files.

Sometimes spiders behave strangely, so in that case the above two rules will save you from trouble.




glennh
Joined: Jun 14, 2007
# Posts: 18

View the profile for glennh Send glennh a private message

Posted: 03/25/2008 11:52 am
Edit Message Delete Message Reply to this message

When you use absolute paths, how do you test the site?



Dinkar
Staff
Joined: Aug 12, 2001
# Posts: 4369

View the profile for Dinkar Send Dinkar a private message

Posted: 03/25/2008 09:12 pm
Edit Message Delete Message Reply to this message

Upload all files to your server and set a password for web root (www / public_html) folder. Now you can test it live.



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10303

View the profile for g1smd Send g1smd a private message

Posted: 03/26/2008 03:37 am
Edit Message Delete Message Reply to this message

I thought my answer was very clear.

The problem is not in whether to have the domain name in the link, but more as to whether you use page-relative or root-relative links.

I don't use page.html or folder/page.html or ../folder/page.html notation.

I always use /folder/page.html (with a leading slash) so the URL always counts from the root every time.

You can prefix that with the domain name if you want, or you can add a <base> tag in the <head> section, which will save bandwidth.

You need to make sure that domain canonicalisation is being done in your .htaccess file.

I test sites by running a copy of Apache on my laptop. That test site can be accessed as http://localhost/ or as http://www.development.domain.com (I add an entry for that to the HOSTS file on the laptop, to force it).

I have a short one-line piece of PHP which tests the requested URL. If the requested hostname is NOT localhost and NOT development then it adds a base tag for the live site domain hostname.

If the hostname is NOT the correct hostname for the live site, then it also adds a meta robots noindex tag to every page of the site.

Think carefully about that logic. It is designed to completely fail safe should domain canonicalisation fail on the live server, or should the development server be moved to be a subdomain on the live site, rather than on the local machine.



glennh
Joined: Jun 14, 2007
# Posts: 18

View the profile for glennh Send glennh a private message

Posted: 03/26/2008 01:43 pm
Edit Message Delete Message Reply to this message

I think I need to back up a bit. I am a small business owner doing my own site's SEO. My SEO is self-taught (almost entirely from this site and seomoz over the last 6 months or so). I build my site using Dreamweaver (with page-relative links). I test the site on my pc using IE then upload to my hosting service. I have implemented your recommendations for the .htaccess file

I have seen several recommendations to use root-relative links. So, I would like to figure out how to do it. I have a couple of background questions.

I am still a novice at all this, so be gentle.
* What are the benefits of root-relative links?
* Why not use index.html in links to the home page?
* Why does Dinkar recommend the full URL for links to the home page and for all links on the home page?
* How does a <base> tag in the <head> section save bandwidth?

I do not have Apache on my pc (I am not ready for that just yet).
* If I switch to root-relative links and create a password protected test subdomain -- will that work for testing the site? Do I need a <base> tag in this case?
* If I use full URLs for links to the home page (or for other internal links), how do I test the site on a remote host?

I am thinking about upgrading to FireFox, does that have any bearing on this topic?

Thanks for all your help!






g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10303

View the profile for g1smd Send g1smd a private message

Posted: 03/26/2008 02:37 pm
Edit Message Delete Message Reply to this message

Root relative means there is not the confusion that you can get with fully relative URLs. When you move a page, or have included content, things can get confusing. Remember it is the browser that resolves the full path, so if all the browser has to do is request the link "as is" then nothing can go wrong.


Google usually prefers to list the shorter URL of "/" and "/index.html" and having two URLs for the same content is Duplicate Content. That can cause you issues with indexing and Pagerank. Best to link to the shorter one and redirect the other one.

The reason for the recommendation for the domain name to be included for links to the home page, and on the home page, is two fold. One is in case your non-www to www redirect fails, your site is still linking to the correct domain. The other is if someone copies your content and reposts it, the links will still point back to the right site.

As for the base tag, the browser uses it as a prefix for all the root relative links, saving you the need to add the domain name on to every link on your site. That makes the size of the code on the page lower, and the page load faster.

You can set up a password protected subdomain. That would be OK. You could add a line of PHP code to the <head> section to add the right base tag to the page depending on the requested URL. That would be OK too.

I wouldn't use the full domain name on the links, just because root-relative (with or without base tag) works just fine for testing.

Installing Apache and PHP isn't all that daunting these days. Back a few years, you really had to get under the hood to edit configuration files and set everything up by hand. Nowadays the Windows Installer takes care of most of it.




freeflyer
Joined: Aug 06, 2007
# Posts: 207

View the profile for freeflyer Send freeflyer a private message

Posted: 04/02/2008 05:12 am
Edit Message Delete Message Reply to this message

i think the difference in speed of page loading and bandwidth by not using the domain name in front of your links is absolutely miniscule, unnoticeable, and certainly not worth bothering about.

Wasnt there an argument once that domain links are better for your site in general due to them giving your site an extra vote, albeit an internal one. Ie , it is essentially another direct link to your domain, as opposed to just a link to a floating internal page.


You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
  1. You have not yet logged in, or registered properly as a member
  2. You are a member, but no longer have posting rights.
  3. This is a private forum, for which you do not have permissions.

If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

If you cannot find this message, click here to Re-Send it.

If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

New posts Forum is locked
© 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions