Go Links @ Home
Setting up go-links in your homelab using DNS search domains and Traefik for elegant URL shortcuts like go/status.
The Problem
Typing full URLs gets tedious. status.example.com is a mouthful when you just
want to check your dashboard. What if you could just type go/status in your browser
and instantly get there?
The Solution: Go Links
Go links (also known as "go/" shortcuts) have been a staple at companies like Google for years. The concept is simple:
- Type
go/somethingin your browser - Get redirected to
https://something.example.com
This is typically achieved through DNS search domains combined with HTTP redirects.
I helped develop a "Smartlink" solution during my time at Cisco to implement go-links with auto-correction in the intranet.
How It Works
The magic happens in two parts:
1. DNS Search Domain
Configure your LAN to use a search domain example.com. When you type go/status
in your browser:
- Your browser searches for
go.example.com - DNS resolves
go.example.comto your Traefik instance - Request arrives:
http://go.example.com/status
2. Traefik Path-Based Redirects
Traefik intercepts the request and applies custom middleware to parse the path and construct a new URL:
$1= subdomain (extracted from path)$2= subpath on destination (optional trailing path)
For example:
go/status->https://status.example.comgo/grafana/dashboards->https://grafana.example.com/dashboards
Flow Diagram
Implementation
Step 1: DNS Configuration
Here is relevant code snippet for my AdGuard Home configuration:
filtering:
...
rewrites:
- domain: "go.example.com"
answer: "192.168.0.2"
- domain: "go"
answer: "go.example.com"
Step 2: Traefik Middleware
http:
middlewares:
go-slug:
redirectRegex:
permanent: false
regex: "^https?://go(?:\\.example\\.com)?/([^/?#]+)(.*)$"
replacement: "https://$1.example.com$2"
routers:
go:
entryPoints:
- web
- websecure
middlewares:
- go-slug
priority: 100
rule: "Host(`go`) || Host(`go.example.com`)"
service: "noop"
services:
noop:
loadBalancer:
servers:
- url: "http://127.0.0.1:65535"
Step 3: Common Shortcuts
Now instead of typing full URLs or bookmarking everything, you can simply:
- Type
go/status->https://status.example.com - Type
go/grafana->https://grafana.example.com
Clean, fast, and elegant.
Future State: Custom Rule Engine
While the current implementation works great for internal services following the
subdomain.example.com pattern, there are cases where you need more flexibility:
The Limitation
Not every shortcut fits the pattern. For example:
go/google->https://google.com(external site)go/docs/k8s->https://kubernetes.io/docs(custom mapping)go/gh/jovalle->https://github.com/jovalle(specific profile)go/technis/pull/24->https://github.com/jovalle/technis/pull/24(parameterized)
These don't map to *.example.com subdomains and require custom rules.
The Solution: Go Link Service
The plan is to build a dedicated go-links application that sits behind Traefik:
Features
Custom Mappings
- Database or config-backed rules
- Support for external URLs
- Integrations (parameterized)
Fallback Logic
- Try custom rules first
- Fall back to pattern-based redirects
- 404 page with suggestions for unmapped shortcuts
Management Interface
- Web UI to add/edit/delete shortcuts
- Analytics dashboard (most used links, 404s)
- Bulk import/export
- API for programmatic management
Advanced Features
- Short-lived temporary links
- Access control (team-specific shortcuts)
- Link expiration
- A/B testing for redirects
Alternatives
There are browser extensions (Golinks and Trotto) that accomplish must of the same thing but require manually adding links. There's also Tailscale's golink but only works within a tailnet and still needs to be manually populated.
