I have 3 stores setup on Magento 2 as follows:

Website --> store_1 --> store_1_view
Website --> store_2 --> store_2_view
Website --> store_3 --> store_3_view

I have changed the unsecure and secure URL in "Stores / Configuration" of one of the views which points to another domain. I think it was the default store.

As soon as I saved the configuration, the "admin" page redirected to the View unsecure URL.

I can not get back into admin as it continually redirects me to the other domain.

Where in the database can I change the settings of the view URL back to the default URL?

I have looked through the database tables, but cannot find the correct table.

  • welcome to MSE. please check in core_config_data table. there you can find urls for all stores Commented Feb 13, 2017 at 7:08
  • Thanks. I found core_config_data and changed the values, but it still redirects to the other domain. How do I clear the cache without accessing the admin panel?
    – Fox
    Commented Feb 13, 2017 at 7:22
  • its good to listen from you. you can delete those cache in root folder. goto var then cache. delete folder named cache. Commented Feb 13, 2017 at 7:24
  • Thank you for your fast response @TejabhagavanKollepara. Worked perfectly... And everyone below that answered.
    – Fox
    Commented Feb 13, 2017 at 7:27
  • good here this from you. but i want to suggest you that please becareful on every action you performed in server. Commented Feb 13, 2017 at 7:28

3 Answers 3


In your database !! you need to check core_config_data table.

It have listed all the secure and unsecure base urls.

To change the unsecure url you need to change value of web/unsecure/base_url path.

Same way to change the secure url you need to change value of web/secure/base_url Path.

then run php bin/magento indexer:reindex command if needed.


It's core_config_data table, run this query:

SELECT * FROM core_config_data WHERE path LIKE '%base%url%';

Dont forget to clear your cache!

  1. Login to your cpanel and goto your database through phpmyadmin
  2. check for the table core_config_data
  3. change the secure url at web/unsecure/base_url path and unsecure base url at web/unsecure/base_url path from here.

Edit from @Todd Robards's(author) comment:

  1. Delete cache from root folder by go to your public_html-->var-->cache. Delete this cache folder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.