Mobile app version of vmapp.org
Login or Join
Barnes591

: How to avoid SSL warnings about certificate not for the current site when redirecting alternate domains? I have multiple domains forward issue. Domains with plurals and singular e.g.: example.com,

@Barnes591

Posted in: #301Redirect #Http #Https #Redirects #SecurityCertificate

I have multiple domains forward issue. Domains with plurals and singular e.g.:


example.com,
examples.com,
example.biz,
examples.biz


I forwarded all of them to examples.com and www.examples.com but ran into web browser warnings about someone could intercept communications as the SSL cert issued is not for the current website I visited. I have SSL cert for examples.com and www.examples.com
What is the best solution for this?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Barnes591

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

Well, at first sight, it seems like you have issued an SSL certificate which you have installed in another domain and this will certainly trigger these warnings.

And you are not telling us which method you used to redirect the domains, there are ways to redirect the domains directly from your DNS panels, or with .htaccess files, or by using a Meta Command in the MySQL DB, or even by making a .php script for the redirection.

My opinion is that you should use


DNS redirect
.htaccess 301 redirects.


In case A you just add a redirect to the domains you want from within the DNS panel at your Domain registrar. This is the simplest and easiest solution.

Then you check again your SSL certificates and after that, you had to make sure that you have purchased the SSL for the right domain, i suggest to install it again.

And that's it.

Now if you want to use the redirect with the .htaccess file you have to NOT redirect your domains from the DNS panel of your registrar to the other domain, but point them in your webserver, in which you will have created the necessary webspace for their hosting, and then you will edit the .htaccess file.

Then you will open the root folder, in the webserver, in the webspace of the domain that is to be redirected, and If no .htaccess exists in your root folder currently, you can create one using an application like Notepad (or a similar plain text application).

The code for the file is contained in the next step.
Make sure that when you save your .htaccess file it begins with a “.”
Note that this file has no tail extension (e.g. “.com” or “.txt”)

Paste the following code into the .htaccess text file: .redirect 301 /old/oldURL.com www.newURL.com In the code, oldURL.com represents the landing page address your visitors will need to be redirected from while www.newURL.com represents the address you'd like your visitors redirected to.
There should be exactly one blank space between oldURL.com and Don't add www to the (old) URL in the first part of the code!

The code "301" is most commonly used on redirected sites and means "moved permanently".

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme