How to make different URLs for website frontend domain URL and admin domain URL for Magento 2?

currently, this is how I access my Magento 2 site:

frontend: https://magento.zzz
backend: https://magento.zzz/admin

I have another server with different where I reserve a subdomain as an access to my Magento 2 website backend for later.

new backend: https://adm.businness.zzz

Is it possible to set up the backend URL only to above URL and how to do that?

1 Answer 1


This is a default feature in Magento2 -

1) Set cookie domain as .website.com from

Store > Configuration > General > Web

2) Set Admin URL as the domain you want to set from

Store > Configuration > Advanced > Admin

3) Set URL as working from the server side.

Make sure the cookie domain is functional as it can cause issues with login on browsers.

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.