How to Get Magento 2 Base URL
As a Magento 2 developer, I many times require to get Magento 2 base URL. In good old days of Magento 1, it was easier to get the base URL using Mage::getBaseUrl(); However, it is not the same case in Magento 2. You can use the two methods to get bas...
-
Sanjay Jethva
- •
- Jun 2, 2025
- •
- 2 min read