How to remove the “base href” tag Joomla 3 Updated on October 8, 2020 by Brad Markle 0 Minutes, 44 Seconds to Read Joomla uses the base tag By default, Joomla adds the base tag to your header (as in the example below): <head> <base href='http ://www.domain.com/page.php’ /> </head> The base tag can cause problems There may be scenarios, however, in which this base tag can cause a problem. For example, if your base tag uses http and your site uses https, this can cause problems when calling css / js files using relative urls. You can remove the base tag If you don’t use the base tag and simply want to remove it, you can easily do so. This base tag is stored in $doc / $document. You can use unset, as in the following example, to remove the base tag: $doc = JFactory::getDocument(); unset($doc->base); Using the code sample above in your Joomla template should remove the base tag. Share this Article Related Articles How to Use the Free Mini Frontpage Extension for Joomla 4.0 How to Change a Joomla 2.5 User’s Email Address How to Configure Joomla 2.5 to Send Email Using SMTP How to Edit a Joomla 3 Template How to install Phoca Gallery for Joomla 2.5 Creating a Menu Item for your Joomla 3 Component Changing Email Settings in Joomla 3.1 Using the Redirect Manager in Joomla 3.1 How to add Bootstrap to a Joomla 3.1 Template How to Use Bootstrap 5.0 Alerts in Joomla 4.0