relative urls

作者:Abby | Jun 5, 2023 5:54:55 AM

Improve Internal Link Strategy

While coding your URLs, you do want to think about internal linking. If you have a <base href> tag that was implemented wrong on the site along with relative URLs, it will create a page that will land on a 404 error page.

For example, on your category page http://www.example.com/category/xyz.html, you have base href tag that reads:

<base href="http://www.example.com/category/xyz.html"/> and relative URLs internal link (/category/abc.html).

When Google crawls your internal links, it will result in 404 error page as shown below.

http://www.example.com/category/xyz.html/category/abc.html

With the use of absolute links, you are avoiding this type of situation.