Gatsbyjs and redirects with trailing slashes

@AdiKris, @Nikhil_Ladha, the following set of logs is seen when building the layer5.io website.

This could lead to non-deterministic routing behavior
warn Non-deterministic routing danger: Attempting to create page: "/community/calendar/", but page "/community/calendar" already exists
This could lead to non-deterministic routing behavior
warn Non-deterministic routing danger: Attempting to create page: "/community/community-managers/", but page
"/community/community-managers" already exists

Between this and SEO tools saying that the site will potentially receive a lower score based on high number of redirects, I’m wonder about the default behavior of Gatsbyjs. Two questions:

  1. What is the default behavior in terms of trailing slashes and how does the layer5.io site have them configured to behave now?
  2. Short URL redirects like https://layer5.io/meshmap are quite handy. Do we need to be concerned with their potential negative impact on SEO? If so, I will suggest that an alternative approach is a separate domain for permanent redirects, like go.layer5.io.

Thoughts?

@Lee that warning comes up due to a race condition while building the site, as we are deleting the page at layer.io/community/ and creating a new one at layer5.io/community i.e, removing the slashes. You won’t see that warning every time when the build happens but occasionally.

Coming to your questions:

  1. Let me dig up and investigate what could be done about the trailing slash issue.
  2. Short URL redirects do not negatively impact the SEO unless we use the short URLs too much. The short URLs shouldn’t be used internally, to allow the actual page to gain the SEO.
1 Like

@Nithish_karthik FYI