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 base URL in Magento 2: […]