If you ever find yourself in a situation where your domain is loading another website after a hosting account migration, it might be because of:

 

Apache HTTPS VirtualHost

In Apache, a domain becomes the default SSL if it is the one present the first time an SSL is installed on the shared VirtualHost IP.

This feature allows control over how Apache handles these requests.

When an SSL certificate is installed, an HTTPS VirtualHost is created for the domain.

Once the said domain is running under HTTPS, Apache will serve the first VirtualHost in the configuration for the matching IP address if there is no valid HTTPS VirtualHost for the domain.

When a website is moved and there is no existing VirtualHost for the requested migrated domain, Apache will just serve the first VirtualHost from the host machine.

Likely the first domain that was present the first time an SSL was installed.

 

CDN (Cloudflare) and File Caching

If the migrated domain is using a CDN (Cloudflare for instance), chances are that the files are still cached.

In such an instance, the first VirtualHost from the source machine will likely be the one that you will see when the website is visited.

If you are running through Cloudflare and the hosting account has recently been migrated, try to remove the cached files.

A CDN (content delivery network) stores copies of files in a cache in servers located closer to your end users than the origin servers so that they can be accessed more quickly.

When a visitor makes a request, the closest proxy server receives the requests from clients and then passes them along to the origin server.

Cloudflare uses PoPs (point of presence) internationally to offer the CDN service.

What you want to do is to purge the stored files from the PoPs so that new files such as images, videos, or webpages can be available to visitors.

You can see the cache purge option by going to Settings >> Cloudflare Settings.

You can also use the Development Mode at Settings >> Cloudflare Settings >> Development Mode >> Toggle On.

The cache purge is done at the domain level (purging will refresh the cache for all your websites that share a domain).

The following Cloudflare support page at https://developers.cloudflare.com/cache/how-to/purge-cache provides information on how to clear the cache in Cloudflare.

You may also want to visit https://developers.google.com/speed/public-dns/cache and use the available options.

Once done, pull up your Terminal and issue the following command to check the domain's cf-cache-status:

curl -Ilk $thedomain.com

 

 

But this might not be the fastest approach though.

If you want the website to be up and running super-fast, set the Time-To-Live (TTL) to 300 seconds and then point to DNS records to our DNS records.

The most important records would be the A record and the NS (name-servers).

Once things have resolved, then you can switch back to running via Cloudflare.

If you are not sure what to do, please do let our technical team know.

Ця відповідь Вам допомогла? 0 Користувачі, які знайшли це корисним (0 Голосів)