top of page
  • Writer's pictureBrent Payne

Page resource URL redirects back to itself

The concern here is that the URL for a necessary website resource is forming a loop by redirecting to itself (e.g., URL 1 -> URL 1), causing the resource to be unreachable.


Why is this important?

When a URL is redirected, usually through a 301 (permanent) or 302 (temporary) status code, it implies the page's address has been altered, directing visitors to a new location.


However, when we're dealing with a page resource URL (such as an image or JavaScript file), this URL is critical for presenting content on a webpage. Inaccessibility could lead to impaired content rendering, degrading the user experience.


What does the Optimization check?

The Optimization activates when any page resource URL redirects to the same location it originated from.


Examples that trigger this Optimization:

Take into account the following resource URL: https://example.com/css/body.css If this URL responded with a 3XX HTTP status code that referenced the same URL, the hint would be triggered.


HTTP/... 301 Moved Permanently ...Location: https://example.com/css/body.css

...


How do you resolve this issue?

Difficulties with page resource URLs hint at improper content rendering, potentially leading to a subpar experience for visitors. Moreover, as search engines prioritize rendering in indexing, inaccessible resources could interfere with proper content indexing.


Page resources should ideally not initiate redirects as it adds to loading times and may complicate rendering. Should the redirect be an internal loop, there are a couple of solutions:

  • Correct the HTTP response - ensure that a 200 (OK) status is returned, eliminating the redirect and opening access to the URL.

  • Eliminate all references - if the resource has been discontinued without a substitute, excise all pointers to the defunct URL. Adapt the page as required to maintain seamless rendering.

How do you get more data from Sitebulb?

To execute the second solution stated above, your final step involves identifying and updating all links that point to the resource.


This information can be gathered by selecting the View button in the URL List, within the No. URLs Referencing Resource column.

6 views

Recent Posts

See All

ClubReq Gets A Link (Because They Asked)

I am a mentor for Techstars and have been for over 10 years. In those ten years I have mentioned to startups to ask ANYONE and everyone that they meet to link to their site. Yet, in all those times on

Comments


bottom of page