Celebrate Our 22nd Anniversary with Huge Savings! Up to 70% Off

What is the best way to fix the WordPress admin page redirection to a different domain?

You must have faced this issue when accessing your WordPress admin page, which redirects to a different domain. So, in this article, we have listed some solutions that may help you resolve this issue.

Solution 1
Check for Redirection Rules in the .htaccess File

1. Log in to your cPanel account.
2. Click on File Manager.

File Manager

3. Open the public_html directory.

public_html

4. Right-click on the .htaccess file and click on Edit.
If there is any code for the redirection rule, remove it and Save the file.

htacess edit

Solution 2
Update WordPress Config File

  1. Log in to your cPanel account.
  2. Open the File Manager.
  3. Open the public_html directory and edit the wp-config file with the lines given below –  

define( 'WP_SITEURL', 'https://www.example.com');

define( 'WP_HOME', 'https://www.example.com');

Note
Replace htttps://www.example.com with your actual URL.

wp-config

4. Click the Save Changes button once you have added the lines.


Was this answer helpful?

« Back

chat