Thursday, September 15, 2011

guys in wrangler jeans::Prefix, while others give you odd error messages and sometimes even result in the wrong page displaying guys in wrangler jeans

guys in wrangler jeans guys in wrangler jeans::Prefix, while others give you odd error messages and sometimes even result in the wrong page displaying?
It all starts with dns, the domain name system.
When you type a name in the address bar of a web browser it takes the server name and posts a query to your nearest dns server.
At this point, depending on how the domain was registered, the dns will either respond with an ip address for example.
If there is no ip address record for the name you the browser will display a standard error page telling you that it cannot find such a site.
If the dns responds back with an ip address, then the browser will attempt to connect and send an http request to it.
Here is where things tend to go wrong.
Http supports a feature called virtual hosting where multiple web sites can be served by the same web server, using just one ip address.
In order to distinguish between different sites living on the same server the browser sends an http header indicating which site it wants to talk to.
If you are a webmaster and for whatever reason you wish to only have your website available when accessed using a www.
Prefix, you should ensure that your domain name does not have an a record.
Most registrars will insert one by default when you first register a domain and so you need to remove it; only add an a record pointing to your web server against the www entry.
Most people will probably prefer to help their visitors out by allowing access via a shortened name as well.
So if your web server has an ip address of 192.
In apache, the first virtual host is the default one and if no server name or alias matches the request, that is what will get served.
So if you are hosting multiple virtual hosts on your server, make sure the first virtual host you define points to a page containing some meaningful message stating that the site is not yet up.
Optional: rewrite the urls to redirect visitors to your preferred domain name if you would prefer your visitors to use one specific name for your site e.
Com from the aliases.
Bottom line: make sure that whatever dns records you do have are also configured in your web server.
And unless you have a good reason not to, you should probably add the short domain name as a valid alternative.

No comments: