Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Joe Dayvie
Joe Dayvie
11,956 Points

Different appearance with/without www in URL.

Howdy - This is a silly question, but how come I see a difference in my website layout with or without the www?

When I place the www, I tend to see an older layout I had. When I do not place the www, I see the more updated version with changes I just made.

I know that it takes time to see changes made but curious as to why it shows up on way and not the other - Thank you.

2 Answers

Do you use a web server, for example nginx? web servers can configurated to serve another file based on the subdomain, in this case "www". In your case the web server serves for example index1.html on a "yourdomain.com" request and index2.html on a "www.yourdomain.com" request...

Joe Dayvie
Joe Dayvie
11,956 Points

I do use a web server but I will be honest, I partially understand what you mean. So its a type of setting setup in the web server or is there something I can alter to make it the same with or without the www - I don't think they should be different.

Which Web Server Software Do you use?

Joe Dayvie
Joe Dayvie
11,956 Points

I am currently using iPage for my website.

PS: I just checked and it's updated now. Thoughts on how I could avoid this from happening in the future?

James Barnett
James Barnett
39,199 Points

It most likely to be data cached in your browser. Try incognito or privacy mode.

Joe Dayvie
Joe Dayvie
11,956 Points

I thought that too but I tried other browsers and on via mobile and still the same at the time.