My site keeps redirecting to old domain after disabling lets encrypt

September 4, 2019 83 views
Apache WordPress Let's Encrypt DNS Ubuntu 18.04

I needed to switch domain names for a wordpress site I just deployed. I made the change in the network section in the digital ocean dash board. I took out all re-direct commands in my config file in the sites-enabled folder. I ran a2dissite on the old ssl config and the default-ssl.conf as well. Its been 48 hrs now and http://kinglimollc.com still redirects to https://kinglimoservices.com.
Any help is greatly appreciated!

1 Answer

Hi @corysmiller,

I’ve done a curl request to the kinglimollc.com domain. Here is the output

curl -IL kinglimollc.com
HTTP/1.1 301 Moved Permanently
Date: Thu, 05 Sep 2019 10:39:46 GMT
Server: Apache/2.4.29 (Ubuntu)
X-Redirect-By: WordPress
Location: https://kinglimoservices.com/
Content-Type: text/html; charset=UTF-8

In reality, the redirection is actually coming from Wordpress, maybe the .htaccess file or your database. What you’ve done is actually an internal migration however there are an internal links to the old domain.

You’ll need to do a search and replace on your database and change every link from kinglimoservices.com to kinglimollc.com

Kind regards,
Kalin D.

Have another answer? Share your knowledge.