I'm currently working on a web-app that uses Magento 2.3 as a CMS-only. How can I disable the customer-facing frontend and leave only the admin pages accessible?

Alternatively, is there a way to set Magento theme so it returns a static html file (something like 404.html) when non-admin/rest routes are visited?

1 Answer 1


You could try something with your Apache/nginx configuration.

Try using httpAuth to block Magento from the public. Or you could use an IP whitelist to only allow certain IPs to be able to view it.

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.