cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SSL certificate and redirecting from www to non www

I recently purchased SSL certificates for 3 domains.  I will talk about one - lesliebairddesign.com.  It works great using just lesliebairddesign.com or https://lesliebairddesign.com and the http://lesliebairddesign.com forwards as well to the https:// version.

 

They don't forward when I added the www to these urls.  I have tried adding the suggested code to the htaccess file.  They don't seem to work.  Here is what I am using:

 

old htaccess file


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /lesliebairddesign/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /lesliebairddesign/index.php [L]
</IfModule>

# END WordPress

 

New code:

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.lesliebairddesign\.com [NC]
RewriteRule ^(.*) http://lesliebairddesign.com/$1 [L,R=301]

 

I tried addiing this code in with the old code and deleting RewriteEngine On.  This did not work. I tried using HTTPS whereever there was a HTTP.  This didn't work.

 

What do you suggest - also these websites are all listed under a main domain of www.lesliebaird.

 

Thanks in advance.

15 REPLIES 15
Moderator
Moderator

Re: SSL certificate and redirecting from www to non www

Hi @lesliebaird, thanks for posting.

Looking at your site, it appears that www.lesliebairddesign.com is not included in your SSL.

If you are using a UCC SSL, you will need to add both lesliebairddesign.com and www.lesliebairddesign.com as SANs to secure them both.

^Gary

Gary - GoDaddy | Community Moderator
24/7 Support | Check System Status

Re: SSL certificate and redirecting from www to non www

Actually, I didn't need to do this. I was able to get the forwarding from www to non www domain to work. It was either through dns pointing or code I found and added it to an .htaccess file in the root diectory. It took a while to propagate. Also I added all search possible names in google searc console and picked preferred domains (yoast Seo plugin)

Anyway it works now. No need to purchase extra certificates.

Re: SSL certificate and redirecting from www to non www

lesliebaird, is your solution still working? I'm having the same issue and the combinations that I am trying aren't working at all. Do you have any additional detail that you can add for your solution or have you lost the steps from your memory by now? 🙂

 

Did you add www.domain.com or domain.com to your Subject Alternative Name?

 

Thanks

Steve

Re: SSL certificate and redirecting from www to non www

I got it to work,but don't remember how?  There is a setting in the Cpanel that may have solved the issue?  You can talk to Godaddy about this?  Sometimes they are helpful, sometimes they are not.

 

The best solution is to purchase SSL's for both url's.  Another issue is that Godaddy doesn't have free ssl's - This is a benefit when you sign up with other providers.  If you don't have ecommerce on your site, than a free one through Let's Encrypt is a good option - that way you can have SSLs on both the www version and the non-www version. 

 

I will check my cpanel and see if I can find the setting.

Re: SSL certificate and redirecting from www to non www

My url was originally www.lesliebairddesign.com.  I wanted to change it to lesliebairddesign.com.  I purchased the certificate for lesliebairddesign.com.

Re: SSL certificate and redirecting from www to non www

I also changed the .htaccess file to:

 

RewriteEngine on

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

RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

 

I am not sure if this did the trick or not.....also check your redirect settings in Cpanel?......Godaddy may be able to help with this?

Re: SSL certificate and redirecting from www to non www

Thank you so much. I may have to try GoDaddy support and hopefully get the right person on the other end of the phone. I doesn't seem fair to have to have double certs on the same domain name. If this is the case it may be time to shop around. Seems like every time I turn around I need to buy something else that they don't tell me about the first time.

 

The funny thing is that they didn't even tell me that the reason I had the issue is because I didn't add my www and non-www to the SAN.

 

Thanks again

 

Steve

Re: SSL certificate and redirecting from www to non www

Before calling GoDaddy try using the code I sent you in the .htaccess file.  I think this was what solved my issue.  I found it on the web.  If it doesn't work - call GoDaddy and ask them about redirection settings or other settings that would forward your www to non-www.  Yes, usually I keep calling them until I get a person who knows something.  Also, make sure it is technical support you are calling.  Frankly - I am going to switch to another host who offers free SSL's.  I have already talked with GoDaddy about this.  We will see if they offer this at some point.

Re: SSL certificate and redirecting from www to non www

I am having this exact issue and no one at GoDaddy will help me - they tell me I have to pay MORE money to get their "coders" to correct the problem they created.

 

The HTACCESS code that you've provided - is that a simple copy and paste...? In other words, do I have to customize any portion of those lines to my URL/domain name...?

 

Your response would be GREATLY appreciated as I really feel like GoDaddy just doesn't give a **bleep**. Been a customer for YEARS and spend hundreds of dollars each year, but they "broke it" and now tell me I'M the one who has to buy it, LOL.

Re: SSL certificate and redirecting from www to non www

Everywhere the code referred to my url, you would change it to your url. Frankly I am switching to another host very soon, that has free certificates. There are many out there. In the mean time, try this code in your htaccess file. Don't forget to save your old one just in case, there are problems with the new code. You can google the issue also, there seem to be a lot of solutions, but this one seemed to work for me.

Re: SSL certificate and redirecting from www to non www

By the way. If you have a merchant site, I would recommend using the more expensive certificates. I don't have merchant sites. Even the other hosts have that option also.

Re: SSL certificate and redirecting from www to non www

Thanks so much for your response. Looks like any mentions of your URL have been removed from the code so I'll study it to see where mine would be inserted. Also looking for other hosting, so please let us know if you encounter a great GoDaddy alternative. Cheers!

Re: SSL certificate and redirecting from www to non www

Just an FYI, I finally have the HTACCESS code needed to redirect my SSL site to its HTTPS address - both with and without the "www" prefix.

 

The answer can be found within this discussion: https://www.godaddy.com/community/SSL-And-Security/Has-anyone-yet-figured-out-the-SSL-redirect-for-q...

 

Here's hoping this offers others the relief it has given me.

Re: SSL certificate and redirecting from www to non www

Hi, I have wordpress sites.....I didn't know that you had a traditional site, sorry. It took a long time for me to find the correct HTACCESS fie code also (online). Kudos to you!

Re: SSL certificate and redirecting from www to non www

No problem! And, I think you've hit the nail on the head: many folks posting code and suggestions don't really know how the web site was created in the first place - and most people would never think to ask. That's not a critique - just something site owners must keep in mind.

 

I hope now, at the very least, folks who write their own HTML/CSS and need a working SSL redirect can use the code I've posted.

 

Thanks again.