The <base> element provides a reference for relative links on the page.
Luckily, you can update your <base> tags and add a proper URL — here’s how.
Having the <base> href attribute point to a malformed or empty URL is incorrect and would lead to search engines encountering thousands of malformed links, causing errors when crawling your site.
If your <base> tag includes an empty or malformed URL, the attribute will need to be updated to include a proper folder path.
Here is an example of an empty <base> tag:
<base href="">
If you’re adding an HREF to the tag, it shouldn’t include the specific URL of the page itself, but rather the <base> URL and/or target for all relative urls on the page. Take a look at these examples:
Correct: <base href="https://domain.com/">
Incorrect: <base href="https://domain.com/example">
If a <base> tag already contains a URL, it may be malformed. Common errors include typos and misspellings.
To make updates to your <base> tags to resolve either of these issues, you’ll need to make changes to your site’s code. If you can’t do this through the CMS, you can bring in the dev team for assistance.
Another approach to updating <base> tags involves SEO execution platform ClarityAutomate. With this method, you can scale your optimizations across your site and implement changes in minutes without relying on your developer resources.
The first step is to specify what to optimize. To update <base> tags, you must update the code.
This fix requires an update since the tag already exists.
Enter the XPath of the tag that needs the optimization.
This step focuses on the href of the <base> tag.
All that’s left to do is enter a valid href and push the changes live.
A few clicks in ClarityAutomate is all it takes to update a <base> tag to add a valid HREF.