Forum Moderators: buckworks & webwork

Message Too Old, No Replies

domain redirect

how to make my site read www.domain.com

         

jribbe1

11:33 pm on Feb 15, 2006 (gmt 0)

10+ Year Member



Hi everyone,

I was curious on how to make a website go from example.com to www.example.com without using a redirect script on the html page.

When users type in the domain without using www, some of the javascript does not work.

I have seen plenty of sites have it the way i am trying to do it.

Is it something in my DNS that i need to set so no matter if they type in the example.com without the www it goes to www.example.com. Thanks.

[edited by: Webwork at 1:40 am (utc) on Feb. 19, 2006]
[edit reason] Charter [webmasterworld.com] [/edit]

Webwork

1:38 am on Feb 16, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I think you are talking about a "server side redirect" or "permanent redirect".

It's a question best addressed to your hosting company as the answer is based, in large measure, on the O/S of the server that is hosting your website.

Basically, the server has to be configured by making settings that redirect http requests for www.example.com to example.com.

jtara

2:58 am on Feb 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



when users type in the domain without using www, some of the javascript does not work

Your problem is most likely not related to redirects, and wouldn't be fixed by anything you could do with redirects or DNS.

It sounds to me like you have some absolute URLs on your site.

Unless you are referring to an external site, NEVER use your domain name in a URL within your own site.

Use:

/articles/creepy_ice_cream.html

Not:

example.com/articles/creepy_ice_cream.html

Or:

www.example.com/articles/creepy_ice_cream.html

The first form is self-referential to the current web site. The other two are going to go to the exact domain name given regardless of anything you do with redirection.

Lobo

4:20 am on Feb 16, 2006 (gmt 0)

10+ Year Member



I just had a similar conversation..

[webmasterworld.com...]

trader

1:16 am on Feb 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...Unless you are referring to an external site, NEVER use your domain name in a URL within your own site. Use: /articles/creepy_ice_cream.html Not:
example.com/articles/creepy_ice_cream.html Or: www.example.com/articles/creepy_ice_cream.html

Why? Strongly disagree with that for several reasons with the most important being I believe your own link within your own site counts toward link popularity, which results in more traffic and higher positioning in the search engines (been there, done that).

Another likely benefit is if your page or content is stolen, framed or hijacked IMO an absolute link can be a benefit too (been there, done that).

We are now in the process of changing old relative links to absolute links when we run across them while editing sites.

jtara

2:53 am on Feb 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if your page or content is stolen, framed or hijacked IMO an absolute link can be a benefit too

This will help with the most lame of hijackers.

However, this is easily defeated.

Site download tools, such as <guess I can't mention the name>, fix-up absolute references so that they are local.

As a practical matter, if somebody is going to snarf your whole site, or any significant portion of it, they are going to have to use such a tool.

(I use this when traveling. I can download an entire site or section of a site about my destination, and view it on my notebook without an Internet connection.)

I can't imagine that absolute references help with search engine rankings. The search engine can follow local links just as well as absolute links. And, surely, they are smart enough to normalize all the links, and know which ones are local and which ones are off-site, regardless of whether they use local or absolute reference.

Absolute references to local pages are just bad form.

trader

6:52 am on Feb 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The SE can of course follow the links either way but as far as I know only the absolute links and its anchor text (a nice benefit) get indexed as an inbound link. I am sure relative ones would not count in link popularity.

A way to test this would be to edit your page adding say 10 links using both methods and then check link:domainnamedotcom a few days after the site is crawled and see if you have 10 new links. It sure would be great if Googleguy would address the issue (if he is still hanging around here).

a1call

7:02 am on Feb 19, 2006 (gmt 0)

10+ Year Member



Hi,
I have to agree with trader. In my experience relative links are hard to maintain and can be a nightmare when you are moving files. If you come across a site with empty boxes instead of images, the chances are those images are referenced relatively and show up fine on the developers computer. I have seen sites with such errors stay such for months if not years.