Knowledge Base - Resources - seoClarity

Base Tag Points to Different Page

Written by Suraj Lalchandani | March 28, 2023

A <base> tag should reference its own folder path, not the path or URL of another page.

If your <base> tags point to a different page, there are a few solutions you can use to solve the issue.

Table of Contents


Why is This Important?

A <base> tag pointing to a different page can cause a serious issue, with all relative links on the page being seen as relative to some other page's path.

How to Solve This Issue

If your <base> tag points to a different page, then, optimally, change relative reference links to absolute reference.

A relative URL will only include the location following the domain. For example:

/xyz.html

If you’re able to change these relative URLs to absolute URLs, they would be updated to include the entire address, starting with the protocol. For example:

https://www.example.com/xyz.html

Another solution is to update the <base> tag to reflect the current page path. Instead of having the HREF attribute point to a different page, the tag would be updated to point to its own path.

For example, let’s say our page is www.example.com/xyz but the tag looks like this:

<base href="https://domain.com">

This would mean our <base> tag is pointing to a different page. Instead, for this example, the <base> tag should be updated to:

<base href="https://example.com/">

Both of these solutions involve directly editing your site’s HTML. If you have the correct edit access, you can make these updates yourself, although they may be on a page-by-page basis.

You can also consult the dev team for assistance.

How to Update Base Tags at Scale

You can expedite this optimization process with SEO execution platform ClarityAutomate. You’ll be able to implement this fix across thousands of pages in just a few minutes with these steps:

1. Select what you'd like to optimize: Code

To update a <base> tag, start by selecting “Code” in ClarityAutomate.

2. Choose how you'd like to optimize it: Update

This fix calls us to update the <base> tag (as opposed to adding or deleting it).

3. Location: The CSS/XPath location that points to the <base> on the page

This step specifies the <base> tag on the page that will be updated. 

4. Attribute: HREF

The specific portion of the tag that needs to change is the HREF.

5. New Value: The correct href of the folder path

Lastly, drop in the new value of the proper HREF that references the folder path (not the full URL!). 

With ClarityAutomate, that’s all it takes to scale your SEO execution. 

Looking for other base tag issues?