Web URL on the browser

ziggy©

Suspended / Banned
Messages
1,939
Name
Dini
Edit My Images
Yes
On my browser, if i type google.com without the 'www', the google page comes up and the URL on my browser changes to www.google.com.

If i type talkphotography.co.uk without the 'www', the TP page comes but the URL does not change to www.talkphotography.co.uk.

What causes them to be handled differently and what do you need to do to ensure that if someone just types domainxyz.com on my website, the URL should change to include the www?
 
Last edited:
"www" is actually a subdomain, it's just usually where the main website is stored.

If you want to force the www, then you have to put in a rewrite, so when a user visits the domain without the www, they're redirected to the URL with it.

My website does the opposite, because I think the www is quite pointless:

http://www.martynhoyer.co.uk/
 
ziggy©;4539836 said:
What causes them to be handled differently and what do you need to do to ensure that if someone just types domainxyz.com on my website, the URL should change to include the www?

It's a setting in the host control panel, these are the options in mine:

Code:
Do you want the www in your URL?
Leave it alone: Both http://www.example.com/ and http://example.com/ will work.
Add WWW: Make http://example.com/ redirect to http://www.example.com/
Remove WWW: Make http://www.example.com/ redirect to http://example.com/
 
It's a setting in the host control panel, these are the options in mine:

Code:
Do you want the www in your URL?
Leave it alone: Both http://www.example.com/ and http://example.com/ will work.
Add WWW: Make http://example.com/ redirect to http://www.example.com/
Remove WWW: Make http://www.example.com/ redirect to http://example.com/

I do the same for some sites I manage using the .htaccess file:

Code:
Redirect http://<domain>/ http://www.<domain>/
 
Back
Top