fermyon / developer

This is the home for developer.fermyon.com
https://developer.fermyon.com
Apache License 2.0
51 stars 67 forks source link

Redirect errors in Google Search Console Report #451

Open tpmccallum opened 1 year ago

tpmccallum commented 1 year ago

The following URLs are showing redirect errors associated with them:

We most likely need to:

tpmccallum commented 1 year ago

Also is it possible to either block (via the robots.txt file) or redirect via the spin.toml file; the following URLs (which are showing as 404 Not Found errors):

The one with the ... (https://developer.fermyon.com/spin/qu...) is a link in an external YouTube video description that was automatically shortened in that YouTube video's description (we have no control over that sort of external 3rd-party URL issue that points to our base domain; so hoping there is something we can do internally to deal with these sorts of things by hand when/if they appear).

These are a bit tricky, but there is only a handful, and it would be great to resolve them in the near future if possible.

tpmccallum commented 1 year ago

Let's look at the first URL at the top of this issue page/description to elaborate.

For the https://developer.fermyon.com/spin/quickstart/rust-components URL, there is a redirect to the newer https://developer.fermyon.com/spin/rust-components URL driven by the spin.toml file's redirect on line 192 https://github.com/fermyon/developer/blob/main/spin.toml#L192

In this case, it appears that we can deem this as a replacement page, and therefore, it might be worth implementing a permanent redirect 301 because it looks like the redirect is a temporary 302 i.e.

curl -vi https://developer.fermyon.com/spin/quickstart/rust-components
> GET /spin/quickstart/rust-components HTTP/2
> Host: developer.fermyon.com
< HTTP/2 302 
HTTP/2 302 
< location: https://developer.fermyon.com/spin/rust-components
location: https://developer.fermyon.com/spin/rust-components

Actually it appears that this may also be the solution for the next URL i.e. use 301 instead of 302 and all of the others in that first set of URLs [1].

curl -vi https://developer.fermyon.com/spin/quickstart/go-components  
> GET /spin/quickstart/go-components HTTP/2
> Host: developer.fermyon.com
< HTTP/2 302 
HTTP/2 302 
< location: https://developer.fermyon.com/spin/go-components
location: https://developer.fermyon.com/spin/go-components

[1] https://developer.fermyon.com/spin/quickstart/rust-components https://developer.fermyon.com/spin/quickstart/go-components https://developer.fermyon.com/spin/quickstart/configuration https://developer.fermyon.com/spin/configuration/redis-trigger https://developer.fermyon.com/spin/rust-components/redis-trigger

itowlson commented 1 year ago

This would require a (small) amount of work on the redirector component, which is currently hardwired to status code 302.

tpmccallum commented 1 year ago

Also, just inspecting the rest of those URLs (in the second comment block, of this GH issue), which are all returning 404 errors, we could also implement 301s if we knew 100% where those URL were intending to resolve.

As far as the external URLs like the shortened ones from third-party sites that end in ... the user will logically receive the following page (which in fairness does have guidance to find home or spin docs or cloud docs etc). Perhaps we could create a new GH task to make the 404 more visually appealing than just small text with links @flynnduism, any ideas on giving the 404 a makeover?

Screenshot 2023-03-13 at 11 09 06 am

tpmccallum commented 1 year ago

Thanks @itowlson This has been an interesting dive into our URLs; perhaps we can close this issue and open a new one just covering the 302 to 301 work and a separate issue that covers working on giving the 404 page an upgrade. Does anyone agree; any extra comments? (Don't want one issue to split into multiple tasks/conversations) :)

itowlson commented 1 year ago

Yep, we already have an issue for the 301 work: https://github.com/fermyon/spin-redirect/issues/3