I recently abruptly changed domains because my old domain got hacked. I bought a new domain, but it doesn't show in google search results yet. I submitted a crawl request via google search console but I'm told it could take a week. In the meantime, when people search my website up, the ip address of my server pops up in the search results. I already edited my nginx config to redirect the ip to my new domain.
The problem is that when I click the ip address link, it tries to use https, and becuase I don't have SSL certificate for the ip, chrome shows the "invalid certificate, connection not secure, return to safety" screen. This is causing my nginx's redirect to my new domain to never go through. How do I make it so that the ip address uses http instead of https? I think if I make that happen, then my users will be successfully redirected to the new domain that has SSL.
nginxconfiguration.