How to fix WordPress admin redirection to a different domain?

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.

  1. Login to your cPanel account.

  2. Click on the file manager.

    File Manager

  3. Open the public_html directory.

    public_html

  4. 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.

    htacess edit

Solution - 2 Update WordPress Config File.

  1. Login to your cPanel account.

  2. Open the file manager.

  3. 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');	
    Note: replace the htttps://www.example.com with your actual URL.

    wp-config

  4. Click on save changes button once you have added the lines.

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to move/transfer WordPress website through FTP?

Regardless of the reason, most of people are gone through the stressful experience of moving a...

How to Disable WordPress Pingback to Prevent Pingback Brute Force and DDoS Attacks?

WordPress has become the most popular CMS and it continuously increases its market share. On the...

How to install theme in WordPress Website

What is a Theme and why we need it? Themes allow users to change the look and functionality of a...

Wordpress Login issue : Could not save password reset key to database.

For Wordpress admin account when you try to reset a lost password, You may get the error "Could...