Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Finding what is causing my site to issue 301 redirects I have an URL which is 301 redirecting but I cannot find where or how it is happening and wanted some checks to perform if possible?

@Nimeshi995

Posted in: #301Redirect #Wordpress

I have an URL which is 301 redirecting but I cannot find where or how it is happening and wanted some checks to perform if possible?


I've checked .htaccess - it's not there
I've checked cPanel in redirects section - it's not there
In WordPress, I have the redirection plugin active and it's not there either


Is there anywhere else that could be issuing redirects? I'm at a loss to find out where and how the page is redirecting!

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

3 Comments

Sorted by latest first Latest Oldest Best

 

@Murphy175

This issue was caused by a .htaccess file in a parent directory. This parent had iThemes Security plugin which had inserted some code into htaccess to block execution of the file: install.php which was filtering down to all sub-directories.

10% popularity Vote Up Vote Down


 

@Vandalay111

I just had this happen, took me a while to find the setting but if you are using Plesk then check this setting from Plesk Panel.

Navigate to Home > Subscriptions > yourdomain.com > Websites & Domains > yourdomain.com > Hosting Settings. Then check "Preferred domain" dropdown you can choose or domain.

10% popularity Vote Up Vote Down


 

@Heady270

Any of the following can cause redirects:


.htaccess files (cPanel usually edits one of these files)
Apache configuration files (usually httpd.conf)
In code (such as a plugin) that sets a Location: header.


To locate the source of redirects, I usually search all the source code using recursive grep on the command line. I usually search for the URL of the redirect.

URLs can be stored in the database as well (some WordPress plugins might do that), so it would be good to look there as well.

If it is malware that hacked your site and caused the redirect, the URL may be obfuscated in the source code to make finding it harder.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme