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

Adding .HTACCESS to force WWW and SSL affects all other domains in my hosting account.

My main hosting account is tied to the domain patricklismore.com

I just installed an SSL Cert for www.PatrickLismore.com and want to rediect any patricklismore.com to www.patricklismore.com and http to https.

I added a .htaccess file to achieve this

 

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.patricklismore\.com$ [NC]
RewriteRule ^(.*)$ https://www.patricklismore.com/$1 [L,R=301]

 

but now if I hit one of my other domains such as BlockchainTechnologyHoldings.com it redirects to

https://www.patricklismore.com/blockchaintechnologyholdings.com

Is there any way to address this correctly via cPanel

1 REPLY 1
Community Manager
Community Manager

Re: Adding .HTACCESS to force WWW and SSL affects all other domains in my hosting account.

Hi @lismore. Thanks for being part of GoDaddy Community! A .htaccess file will usually affect the directory it's in and any directories under it. To address what you're seeing, you should be able to script the redirect to only work on a specific domain. I'm not proficient in doing this, but I know it can be done. You can also try adding a .htaccess file for any directories you do not want the file in the parent directory to affect. Essentially, giving a child directory it's own .htaccess file should tell the server to not apply the settings from the parent directory. Hope that helps. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.