What I've tried:
I've implemented a 301 redirect from an old domain to the new domain being used on a site after following this: How to redirect to a different domain using NGINX?
What is happening:
The domain is still not redirecting though, and it's been over 24 hours.
What happens is that an SSL warning comes up when I go to the old domain, and after clicking "continue to website" I go through to the new website (new changes I've made, stored in /var/www/new_domain/html), but with the old domain.
Request:
Where should I start troubleshooting this? I need to redirect this domain for SEO transference.
Code:
This is the nginx server block of the old domain:
server {
root /var/www/old_domain_webroot_dir/html;
# Add index.php to the list if you are using PHP
index index.php index.html;
listen 80;
listen 443 ssl;
server_name old_domain.com www.old_domain.com;
rewrite 301 https://new-domain.com$request_uri;
}