It is annoying when you try to access your WordPress admin page and it redirects to a different domain. Here, we have mentioned a few steps which may help you to overcome this issue.
Solution - 1 check for redirection rules in .htacess file.
- Login to your cPanel account.
- Click on the file manager.
- Open the public_html directory.
- Right-click on the .htaaccess file and click on the edit. If there is any code for redirection rule remove it and save the file.
Solution - 2 Update WordPress Config File.
- Login to your cPanel account.
- Open the file manager.
- Open the public_html directory and edit the wp-config file with the below lines.
define( 'WP_SITEURL', 'https://www.example.com'); define( 'WP_HOME', 'https://www.example.com');
- Click on save changes button once you have added the lines.