I have a new site that only opens if i use http:// if i try http://www. it wont open can anyone tell me whats wrong. Thanks in advance.
Nobody can as there is no information in your post. Anyhow, does your DNS resolve your domain name including www?
hello when this code is write in in notepad and save with web.xml then your site open <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpRedirect enabled="false" destination="http://www.beautifuljewelery.com" httpResponseStatus="Permanent" /> <rewrite> <rules> <rule name="Redirect domain.com to www" patternSyntax="ECMAScript" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^beautifuljewelery.com$" /> </conditions> <action type="Redirect" url="http://www.beautifuljewelery.com/{R:0}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> in this code replace beautifuljewelery.com to your site name.
Akhilesh, why are you redirecting to www, when he clearly said the www does not work?? Easymoneyathome, first verify that this is not a DNS problem. Ping both domain names and make sure they both resolve to the same IP. Next, your web server must listen to both names, with and without www. I use IIS. I can help you with that. For Apache, there is plenty of info on the web.
You will need to use .htaccess to redirect any non www traffic to www or vice versa. (In your case, 301 redirecting to non www from www) This will also help you with SEO as you'll not need to care if the backlinks you get are to the www version or not. The 301 redirect tells google to attribute the backlink to the original non www when it comes across such a link.