Https:// redirect to other domain on same server after issuing and setting up SSL

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

I am having files
cert.pem chain.pem fullchain.pem privkey.pem
in
/etc/letsencrypt/live/buzzdelhi.in
which i gets from command
sudo certbot-auto certonly --standalone -d buzzdelhi.com -d www.buzzdelhi.com
with a success message, but the domain name buzzdelhi.com with https:// redirecting to https://entertainry.com/ which is the another domain on same server.
I am a newbie in this, i setup SSL couple of times ago on other domains too, but this time i am having this issue.
i am having buzzdehli.in.conf file in /etc/apache2/site-enabled diretory with following contents

<VirtualHost *:80>
ServerName buzzdelhi.in
ServerAdmin webmaster@localhost
DocumentRoot /var/www/buzzdelhi.in/
ErrorLog {APACHE_LOG_DIR}/error.log CustomLog {APACHE_LOG_DIR}/access.log combined

<VirtualHost *:443>
DocumentRoot /var/www/html
ServerName buzzdelhi.in
ServerAlias www.buzzdelhi.in
ErrorLog {APACHE_LOG_DIR}/error.log CustomLog {APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/buzzdelhi.in/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/buzzdelhi.in/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/buzzdelhi.in/chain.pem

Please tell me what is am missing is i am having issue with SSL or Apache itself? let me know if any other details are needed.

Thanks in advance.
My domain is: buzzdelhi.in

I ran this command:

It produced this output:

My web server is (include version): Apache/2.4.38 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 19.04 (GNU/Linux 5.0.0-27-generic x86_64)

My hosting provider, if applicable, is: vultr.com

I can login to a root shell on my machine (yes or no, or I don’t know): Yes, (SSH access)

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):
certbot --version => certbot 0.31.0
certbot-auto --version => certbot 1.3.0

1 Like

HTTP connections are not redirected:

curl -Iki http://buzzdelhi.in/
HTTP/1.1 200 OK
Date: Sat, 02 May 2020 04:43:23 GMT
Server: Apache/2.4.38 (Ubuntu)
Content-Type: text/html;charset=UTF-8

HTTPS connections do get redirected.
But that seems that is may be an incorrect setting in WORDPRESS.
[it could be in Apache - but I doubt you went in there to change anything manually]

curl -Iki https://buzzdelhi.in/
HTTP/1.1 301 Moved Permanently
Date: Sat, 02 May 2020 04:43:30 GMT
Server: Apache/2.4.38 (Ubuntu)
X-Redirect-By: WordPress
Location: https://entertainry.com/
Content-Type: text/html; charset=UTF-8
1 Like

Thanks for you kind reply
i also noticed that too so what i do yesterday is, i actually rename the folder which serve buzzdelhi.in on server. and create a fresh directory using ‘mkdir’ command, but still x redirect by WordPress is appearing on headers, i am confused, if folder is fresh how can it be x-redirect-by WordPress?

you can check by clicking http://buzzdelhi.in (without https), it is an empty folder.

Please help

1 Like

Sorry I don’t know much about WordPress.
I might be able to help you with Apache.
But changing the Apache config outside of WordPress may get overwritten with any future WordPress modifications.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.