Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am cleaning markup on a website for my first customer. I did not build the site; I want to remove the table-based design and replace it with proper CSS, before I add a shopping cart to the site. http://www.theresheglowsdayspa.com

I noticed by accident that the appearance will change if 'www' is removed from the URL.

Can someone explain what's going on here? Also, is there a best practice with 'www' or no 'www' in the URL?

share|improve this question

migrated from stackoverflow.com Oct 17 '10 at 1:21

This question came from our site for professional and enthusiast programmers.

It's because on your server, you haven't configured it to work (you need to add an entry for the server to associate that name with the specific site). You'll need to specify what server you are running on, and it can be easily fixed. – Noon Silk Oct 17 '10 at 1:02
Seems to look the same for me, regardless of the www subdomain. I'm using Chrome 7.0.517.36 on Ubuntu 10.10, if it matters. – David Thomas Oct 17 '10 at 1:02
Looks same on the latest version of Opera. – Crusader Oct 17 '10 at 1:10
The 'bug' appears only in Firefox. – user2485 Oct 17 '10 at 3:41
@user2485: could you plz be more specific?! What are the differencies (at least describe one) you are seeing when displaying site with/out 'www'. Anyway the site layouyt is a piece of junk, it shows tons of validation errors, and each page displays the menu differently. Whether using 'www' or not it should be your last concern here, – Marco Demaio Oct 18 '10 at 20:23
up vote 2 down vote accepted

Using www or not is debatable for aesthetic reasons - however cookies and other same domain policy stuff attached to a example.com will affect something.example.com, however www.example.com will affect itself only.

There could also be stuff like server side code that assumes the presence of www in the URL.

There could also be rules for a server such as Apache that handles things differently.

share|improve this answer
When you mentioned cookies it gave me the idea to test other browsers. This problem only occurs on Firefox 3.6, and looks the same on IE and Chrome. I still don't know why but at least I know its a Firefox issue, thanks. – user2485 Oct 17 '10 at 1:56

take a look at the links in the side menu.

they strip out the www and show a full domain link. you could linke them as:

this would shorten the url, and would work in both www. and non www requets.

here is how i usually do it: i like all my assets from it may be a bit longer, but keeps things cleaner in the long run.

Then i use a URL Rewrite script to redirect all non www to www. This is for SEO purposes because google sees www.yoursite.com and yoursite.com as two seperate sites.

If you are using IIS its simple to do with URLRewrite, apache has something called mod rewrite.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.