Welcome to WebmasterWorld Guest from 107.20.54.98

Forum Moderators: buckworks & webwork

Message Too Old, No Replies

URL problem in my site.

My Site did not open with www

     
6:23 pm on Jan 2, 2009 (gmt 0)

New User

5+ Year Member

joined:Jan 2, 2009
posts: 26
votes: 0


hi friends,

this is my first post at webmasterworld.com

Anyway i want to ask you one question: Actually i bought a domain http://example.com , but whenever i type http://www.example.com in the address bar, it goes back to http://example.com.

I mean the URL doesn't retains "WWW" in it.

So could you guys tell me that what actually the problem is?

[edited by: Webwork at 6:29 pm (utc) on Jan. 2, 2009]
[edit reason] Per TOS & Charter please avoid specific reference to your domain(s) [/edit]

6:33 pm on Jan 2, 2009 (gmt 0)

Moderator This Forum

WebmasterWorld Administrator webwork is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:June 2, 2003
posts:7805
votes: 21


Hello VirginTech. Welcome to WebmasterWorld.

It's not a problem. It's (likely) the result of a web server setting that tells visitors to your website that the actual/correct/canonical version of the website resides at http://example.com.

Basically, there shouldn't be "2 copies" of your website: www.Example and Example.com. So the server "resolves" the www version to the non-www version.

7:01 pm on Jan 2, 2009 (gmt 0)

New User

5+ Year Member

joined:Jan 2, 2009
posts:26
votes: 0


Thanks Webwork!
7:49 pm on Jan 2, 2009 (gmt 0)

Moderator This Forum

WebmasterWorld Administrator webwork is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:June 2, 2003
posts:7805
votes: 21


You're welcome. If only they were all that easy. ;)

If anyone cares to add any further specifics or directions . . well, fire away. :)

FYI, "resolves" and "redirects" or "service side redirect" are terms you should read a bit about. Also "301 redirect", "permanent redirect", and "302 redirect". Chances are they will come into play in the course of operating your website at some point.

12:05 am on Jan 3, 2009 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator ianturner is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 19, 2001
posts: 3449
votes: 10


I would also check that www.example.com/myfile.htm redirects to example.com/myfile.htm when the main URL redirects - if it doesn't it could indicate a problem with the way the redirect is set up.
12:19 am on Jan 3, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


That latter point is most important.

Do test it - and not just by looking in your browser URL bar.

Use a Firefox extension called Live HTTP Headers and make certain that the redirect returns "301" as the status code.
That is, be absolutely sure that it does *not* return "302".

9:13 pm on Jan 26, 2009 (gmt 0)

Full Member

10+ Year Member

joined:Mar 29, 2003
posts:204
votes: 0


If your in a Windows hosting environment...

To me it sounds as though your DNS contains both versions of the domain but your host header only has the non-www. domain.

1. make sure your DNS records have both (www. and non www. versions) of your domain and that they both point to IP addresses on your server

2. check the IIS host header file.. that's 99% gonna be your problem.

3. make sure your not doing some redirection from www. to non www.

I can elaborate further if your in a windows server (IIS) environment... if in Linux - im not your guy.

11:37 pm on Jan 26, 2009 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator ianturner is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 19, 2001
posts: 3449
votes: 10


I would somewhat disagree with that last statement - if you are hosting in a windows environment you want to make sure that the redirect is actually a 301 redirect rather than both versions of your domain being in the host headers on the same website.

Almost invariably if you are in a windows environment you need both a www.example.com and an example.com website set up, ensuring that one 301 redirects to the other.

1:32 am on Jan 27, 2009 (gmt 0)

Full Member

10+ Year Member

joined:Mar 29, 2003
posts:204
votes: 0


Very true Ian regarding the 301 redirect.

I was only addressing a possible reason for the symptoms the OP was experiencing and not prescribing best practices for the redirection.

8:14 am on Jan 27, 2009 (gmt 0)

New User

5+ Year Member

joined:Jan 2, 2009
posts:26
votes: 0


Thanks to all u guyz for your help:-)