Reputation:
First of all, what's the difference between:
www.domain.com
and
domain.com
Should I pay attention to this when I do the coding?
Upvotes: 0
Views: 138
Reputation: 9509
I would highly recommend to use relative paths.
This has many advantages, for instance:
In general there IS a difference between: www.domain.com and domain.com. The "www" prefix is nothing more than an ordinary subdomain: http://en.wikipedia.org/wiki/Subdomain
Upvotes: 5
Reputation:
Relative urls arnt the best idea. its a good idea to have one constant hold the value for a relative url and the rest to be static
Upvotes: 0
Reputation: 25665
domain.com
Is the registered domain and
www.domain.com
Is a sub-domain of domain.com
, they are not alway the same. Most web sites will set up their webserver to redirect domain.com to www.doamin.com or vice versa.
Depending on the DNS Zone file configuration sub-domains can point to different IP addresses (possibly different physical servers).
example.com. A 10.0.0.1 ; ip address for "example.com"
ns A 10.0.0.2 ; ip address for "ns.example.com"
www CNAME ns ; "www.example.com" is an alias for "ns.example.com"
wwwtest CNAME www ; "wwwtest.example.com" is another alias for "www.example.com"
mail A 10.0.0.3 ; ip address for "mail.example.com", any MX record host must be
Taken form Wikipedia - DNS Zone File
Upvotes: 3