1

I have created a website recently and was checking if google has indexed my website on google console. My home page is indexed but my other leaf pages connected to my home page are not indexed yet.

"URL might be known from other sources that are currently not reported"

It shows this in my Google search console, so I was wondering if is it the URL which I have given relative to base url i.e href="./second-page" is the issue or its just I need need to be more patient till the google crawls and indexes my pages?

3
  • 2
    Why are you setting the base href? Why is it relative? Most sites don't set the base href, and when it is set it is usually set to an absolute URL. What is the reason that you are setting it like this? Aug 9, 2021 at 10:36
  • First of all let me tell Im new to web development so please bare me if I say something wrong. When I had put absolute url sometimes it was showing some error over http and https thats when I decide to keep everything relative Aug 9, 2021 at 10:53
  • 2
    Why a base href at all? You can usually use root relative linking so that you don't need it. Make every link on your site start with a slash, ie href="/somedir/page.html" Same goes for images, CSS, and JS. Root relative links make them work regardless of directory depth of the current page and eliminate the most common need for a base href. Aug 9, 2021 at 11:03

2 Answers 2

1

It can, but like everything else in SEO...it depends.

If relative URLs are used on an HTTP page to include something from a CDN, for example, it retrieves the HTTP version. If you use a relative URL to link to another page, it will retrieve the HTTPS version, assuming that the page you placed it on has SSL enabled (is https).

Allowing the request over HTTP opens the door to security vulnerabilities. It’s always safe to request HTTPS assets even if your site is on HTTP, however the reverse is not true.

As best practice, you should use only https:// URLs when loading resources on your page (even if these are 3rd party resources that do not live on your own domain).

If you are having issues, for each URL that loads protocol relative resources, update the resource references to point to the HTTPS counterparts, using absolute URIs.

1

There is no difference with the SEO effect. I Think relative URLs are easier to handle if the website will be changed regularly. I manage it with relative URLs in E-Commerce Shops.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.