Domain redirects to another domain with nginx and letsencrypt

Hi everyone,

how to fix an issue with a redirection from one domain https://foodshare.club/ to another https://netfleet.ru/? I’ve just noticed that it doesn’t redirect when I open https://foodshare.club/wp-login URL.

My domain is: https://foodshare.club

I ran this command:
sudo certbot --nginx -d foodshare.club -d www.foodshare.club

It produced this output:

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/foodshare.club/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/foodshare.club/privkey.pem
   Your cert will expire on 2020-10-30. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:
   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

My web server is (include version):
nginx version: nginx/1.14.0 (Ubuntu)

The operating system my web server runs on is (include version):
Ubuntu 18.04

My hosting provider, if applicable, is:
Digitalocean

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

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 0.31.0

1 Like

Your website has other issues, I’d say:

# curl -IL https://foodshare.club
HTTP/1.1 502 Bad Gateway
Server: nginx/1.14.0 (Ubuntu)
Date: Sat, 01 Aug 2020 10:10:52 GMT
Content-Type: text/html
Content-Length: 182
Connection: keep-alive

# curl -IL https://foodshare.club/wp-login
HTTP/1.1 404 Not Found
Server: nginx/1.14.0 (Ubuntu)
Date: Sat, 01 Aug 2020 10:11:12 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: PHPSESSID=fa7suafo23877h8t6s2oj8dd8v; path=/
Pragma: no-cache
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-transform, no-cache, no-store, must-revalidate
Link: <https://foodshare.club/wp-json/>; rel="https://api.w.org/"

2 Likes

Hi @organic

Domainname Http-Status redirect Sec. G
http://foodshare.club/ 46.101.99.43 301 https://foodshare.club/ Html is minified: 107,78 % 0.040 A
http://www.foodshare.club/ 46.101.99.43 301 https://www.foodshare.club/ Html is minified: 107,78 % 0.040 A
https://www.foodshare.club/ 46.101.99.43 301 https://foodshare.club/ 3.914 B
https://foodshare.club/ 46.101.99.43 GZip used - 27324 / 109216 - 74,98 % Inline-JavaScript (∑/total): 69/19552 Inline-CSS (∑/total): 12/48262 404 Html is minified: 304,41 % 4.783 I

May be you have an old cache.

PS: You have already created 3 certificate. Please use one of these instead of creating the next.

Issuer not before not after Domain names LE-Duplicate next LE
Let’s Encrypt Authority X3 2020-08-01 2020-10-30 foodshare.club, www.foodshare.club - 2 entries duplicate nr. 3
Let’s Encrypt Authority X3 2020-07-31 2020-10-29 foodshare.club, www.foodshare.club - 2 entries duplicate nr. 2
Let’s Encrypt Authority X3 2020-07-30 2020-10-28 foodshare.club, www.foodshare.club - 2 entries duplicate nr. 1
2 Likes

Oh sorry, it’s my bad, I’ve just eddited this command above to sudo certbot --nginx -d foodshare.club -d www.foodshare.club.

1 Like

There’s no such redirect in place, not from my point of view.

2 Likes

Yeah mate, I’ve just browsed https://foodshare.club/ in incognito mode and it opens well. Looks like it’s was the old cache as @JuergenAuer assumed.

1 Like