The <base> HREF should refer to the folder path and not the actual page URL.
If your <base> tag references the page that it’s on, you can update the directive. Here’s how.
The <base> HREF directive provides a reference for relative links on the page.
Having the <base> point to the page URL is incorrect coding and could lead to crawlers discovering thousands of malformed links, causing errors when crawling your site.
If the <base> HREF refers to the page and not the folder path, follow the example below to update it.
Let’s use this sample URL:
https://seoautomation.io/playbook/base_same_page.html
When looking at the HTML for this page (you can do this with the “Inspect” feature of your browser), we see that the <base> tag’s HREF is the same as the page’s URL:
<base href="https://seoautomation.io/base_same_page.html">
Instead, since the <base> tag should refer to the path (i.e. https://seoautomation.io) this tag needs to be updated to be:
<base href="https://seoautomation.io/">
If you have direct edit access in your CMS, you can update your tag on a page-by-page basis. If you don’t have the proper edit access, you can bring in the dev team to help make the update.
If your <base> tag refers to the page itself, you can update it in a matter of minutes with SEO execution platform ClarityAutomate.
First, select “Code” within ClarityAutomate since the <base> tag is part of the HTML.
No additions or deletions need to be made in this case. Instead, an existing <base> tag will be updated.
This step specifies the <base> tag on the page to be updated.
The specific attribute of the <base> tag to be updated is the HREF.
This will update the HREF — remember to reference the folder path. Then, you can push your changes live!
With ClarityAutomate, we were able to change the <base> tag’s HREF from the specific URL to the folder path, all without the dev team!