Magento – Make backend url domain different from frontend url domain

backendfrontendmagento2url

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?

Best Answer

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.

Related Topic