Site Redirecting
Site Redirecting
Another common issue our clients see if their lovely new site redirecting elsewhere, very annoying. It might be that it's just been copied or that you're trying to migrate it or set up a staging site. Whichever one it is you need it to load on the right page and not go off on a tangent somewhere else! Here are a few tips of things to check if your site is redirecting.
First one, try using our Client Preview URL, is it still doing it? If it's not then it might be that the domain is being redirected at domain level (see my last note on this article).
Otherwise, check to make sure that the database contains the right URLs. For a WordPress site it's the core URL and Home fields in the Options table, for Magento it's base URL (secure and non secure) in the core_config_data table. You can check these via phpMyAdmin, here's the guide for where you can find it. Find the tables mentioned above and check what URLs are listed. If they're not correct, then fix them and then try accessing the site again. With a Magento site we'd suggest clearing the cache and then try again. Please note, WordPress multisites are a little more complicated as they have a number of options tables, you need to take a look at the main one at least, and which table that is in will be defined in your wp-config.php file.
Talking of wp-config.php files, that's another good place to look if the database is showing as correct. Sometimes the core url and home URLs are defined in the wp-config.php file AND in the database... so best to take a quick peak there.
Take a look at your .htaccess file, maybe try replacing it temporarily with a default one to see if that makes a difference. Make sure you have a copy of the original one so you can put it back in place if that doesn't resolve it.
It starts getting tougher at this point, you could try running the URL through a redirect checker (just Google redirect checker to find one), that may tell you what's handling the redirect. If the redirect checker says the redirect is 'powered' by WordPress then take a look at your plugins, try disabling them one at a time and then rechecking the site.
You should check with your registrar too as redirects can be set at domain level, before traffic even hits the server.
Updated about 2 months ago