ipfs / ipfs/kubo

For IPNS to redirect to a custom 404 not found landing page

Open
#5,916 4 comments 2 reactions 0 assignees View on GitHub
kind/enhancement topic/gateway
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

When doing IPNS lookups through DNS using the TXT record trick (dnslink=/ipns/), it would be nice to be able to setup a custom 404 not found landing page.

Right now if a wrong URL is given the following happens:
`https://ipfs.io/asdf` returns `Path Resolve error: no link named "asdf" under QmXkYb9qNw3vHHf5WmK9ckNSW6h1j5j7wAwGL6zG5TtZDP`

I've tested on my own IPFS node and it looks like the daemon throws a 505 error code when it can't resolve the path. I don't care so much about which error code it is but I think it would be neat if we could setup a hash for some other content to be served on such error.
This might go against the content addressable property of IPFS though. But maybe there's enough flexibility within IPNS to deal with such a "feature".

The main reason I'm bringing this up is that I seem to understand that for IPFS to replace HTTP or at least to cohabit with it, it should behave in the same way from the user's point of view. Plus a proper landing page on an error is probably more meaningful to the user than a `Path Resolve error` message.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.