My domain doesn't work unless the www is added before it.

bsbear

BANNED
Joined
Sep 7, 2011
Messages
100
Reaction score
10
I'm not really sure why this is, but when you go to my website, without the www, it goes to the registrar's site.

Otherwise it works fine.

Check it out, hilariouspicturez

C0m
 
use .httaccess to redirect no www version to www, I'd have to dig to find the code

OK, found it, just change it as it redirects www to no www and of course substitute the example with your domain name.

RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

On the other hand - I don't know if blogger lets you use .httaccess file...
 
Last edited:
use .httaccess to redirect no www version to www, I'd have to dig to find the code
That's not going to help in the case the OP is describing. The .htaccess redirection is only helpful if both versions resolve to his host account and then he wants to make sure that no matter what everyone will land on his prefered url.

The problem the OP is describing is caused by how the DNS is set up at his registrar. He needs to go to his registar and look at the settings. If he can't figure it out on his own then open a support ticket with the registrar.



use .httaccess to redirect no www version to www, I'd have to dig to find the code

OK, found it, just change it as it redirects www to no www and of course substitute the example with your domain name.

RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

On the other hand - I don't know if blogger lets you use .httaccess file...
That's the correct code for redirecting from the www to non-www version of his site, which is useful in many situations. Unfortunately since the non-www version is currently resolving to his registrars website it isn't going to help him much this time. With the problem the OP is having that code will only result in the visitors using www version also ending up on his registrars site. :cool2:

Since it's a blogger site, I'm not sure if you even have access to the DNS records though. There should be some setting on there dealing with this issue though.


edit-
@OP - Here it is from the Blogger help pages. Apparently this happens when you use a custom url for blogspot in which you're using a domain you already own. It looks like you didn't do the optional A-list part of these instructions when you set up your DNS records at your registrar.
How do I use a custom domain name for my blog?

Blogger offers two free publishing options for your blog: hosting on Blogspot (example.blogspot.com) and hosting on your own custom domain (www.example.com or foo.example.com). You can change your publishing option at anytime, and your content will always remain unaltered regardless of which of these options you choose.

Whether you want to purchase a new domain through Blogger or publish on a domain which you already own, we'll walk you through the process of setting up your blog for a custom domain.

What would you like to do?

- Buy a custom domain through Blogger.
* Host my blog on a URL that I already own.

Where would you like to host your blog?

* On a top-level domain (www.example.com).
- On a subdomain (foo.example.com).​


Find the control panel on your domain registrar's website, and locate your DNS (Domain Name System) settings. In order to link your blog to your custom domain, follow the instructions below to enter your "CNAME" and "A-records."

CNAME
Where it says Name, simply enter "www" and list ghs.google.com as the Host Name. See our detailed instructions on providing CNAMEs for various registrars. If yours isn't listed, or if you run into other difficulties, contact your registrar directly and they can help you out.

A-records (optional)
The following action links your naked domain (example.com) to your actual site (www.example.com).
If you skip this step, visitors who leave off the "www" will see an error page.
Enter your domain name in the format example.com, and list the I.P. addresses shown below in the "A" section. You'll need to create four separate A-records which point to four different Google IPs.

216.239.32.21
216.239.34.21
216.239.36.21
216.239.38.21​
Just follow those steps for setting up the A-records and you should find the non-www version of you site will work fine.

Hope that helps. :cool:
 
Last edited:
greywolf, that was exactly what I needed. Thanks man.
 
Yeah, I figured it out, thanks for posting here.

/closed
 
Back
Top