Is it possible to run the Magento admin from a subdomain? I.E. https://d1.com - live site admin; https://backend.d1.com/admin

I've attempted alias/park domain and a view other things (of course setting the custom url in Config > Admin ) but it usually just gets stuck in a redirect loop going to https://backend.d1.com/admin

Any advice would be greatly appreciated.


Yes! There is a possiblility to run from a subdomain.

Along with Aman's answer, you need to mask and forward the subdomain (https://backend.d1.com) to main domain (https://d1.com) in your domain settings.

For reference, see this

  • Welcome Bhargava!! Instead of posting links that may someday be broken, post the answer contained in the link instead. You can give credit to the site. Thank you for answering! – seanbreeden Sep 27 '18 at 18:20

I think it is possible you can set the custom admin URL from Magento backend/admin

Store -> Configuration -> Advanced -> Admin -> Admin Base URL -> Use Custom Admin URL (Yes) -> Custom Admin URL

enter image description here

  • Yeah I've attempted that, I setup an alias/parked backend.domain.com and pointed the admin url there, but it has redirect issues. There may also be CORS isssues. – ChaosTheoryV2X Sep 19 '18 at 0:01

Is this of any help? https://gist.github.com/tegansnyder/65ba3396ec7cbf70bec9

I think it's for Magento 1 but principle should be the same?

  • Yeah I did attempt that. I gave up anyways though honestly. I think there may have been CORS issues but surprisingly couldn't find anyone else attempting it. The reason I was attempting it I found an alternate solution to. – ChaosTheoryV2X Sep 28 '18 at 19:08

The solution for Magento 2 is pretty simple:

Just configure as the main domain name (default value): backend.domain.com. So the admin will be available at backend.domain.com/admin.

Change scope to the storeview, and enter www.domain.com as the store domain name. So the store will be available at www.domain.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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