Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8140923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:19:40+00:00 2026-06-06T12:19:40+00:00

I have godaddy hosting and I am using it to host multiple domains. With

  • 0

I have godaddy hosting and I am using it to host multiple domains. With this hosting I got a free standard (One domain) SSL certificate. I set it up on my primary domain and all is good, https://www.primarydomain.com works. Also my secondary sites still work with the regular http.

(Also just so you know, most browsers tell me to go back, bad site, might harm computer, etc when I go to https://secondarydomain.com because the certificate is only for the primary.)

So what I am trying to do is when the user goes to my primary site, the htaccess automatically changes to the https using this code:

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

That works and all is good, but because the secondary domains get their content form directories of the first domain, the .htaccess affects all domains I have, thus trying to add https to my secondary domain. (Tells user to leave site)

How would I tell .htaccess to change to https only when on my primary domain and to just leave it alone with the http for my secondary domains?

If you don’t know what the heck I am saying, you can see how right away my primary domain changes to https: http://www.alexkafer.com

Then one of my secondary domains: http://www.codingapple.com also tries to change to https, even though it is not made for that domain.
I promise my secondary is not going to harm your computer, it is just the certificate is not for the domain codingapple.com That is what I am trying to fix.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:19:41+00:00Added an answer on June 6, 2026 at 12:19 pm

    Thank you @Scott S for your code. It worked prefect, except it did the oposite that I wanted.

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^(127\.0\.0\.1|localhost)$
    RewriteCond %{HTTPS} !on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    

    The above code changed every secondary domain to HTTPS instead of the primary to HTTPS.

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(127\.0\.0\.1|localhost)$
    RewriteCond %{HTTPS} !on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    

    I removed the ! before the ^(127.0.0.1|localhost)$ and now it is doing what I need!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using godaddy as a host provider. I have a wordpress database setup
I am using a GoDaddy web hosting plan on a Windows platform. This was
I have been trying to connect to my database using pdo on godaddy with
I have a shared hosting on godaddy. I tried to change session save path
I have an hosting account on Godaddy which has been redirected for last few
I have a shared-hosting account at GoDaddy, which includes LAMP (Linux, Apache HTTP Server,
I have godaddy asp.net hosting. Every time I upload the build, it’s a manual
i have a hosting server on godaddy. i have the economic plan which is
I have installed Magento in Godaddy shared hosting with apache mod_rewrite enabled while installing
I have shared hosting(godaddy). I have subdomain car. I need create 2 project. in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.