What Is Location Header?
The Location header is an HTTP response header that tells the browser which URL to navigate to during a redirect. It's included in every 3xx redirect response and is the mechanism that makes server-side redirects work.
Why It Matters
The Location header is the technical mechanism behind every server-side redirect. When Domain Forward redirects old-domain.com to new-domain.com, it’s sending:
HTTP/1.1 301 Moved Permanently
Location: https://new-domain.com
Without this header, the 301 status code is meaningless — the browser knows it should redirect but doesn’t know where to go.
How It Works
The Location header appears in HTTP responses with 3xx status codes:
HTTP/1.1 301 Moved Permanently
Location: https://new-domain.com/page
Content-Length: 0
The browser:
- Reads the status code (301 — permanent redirect)
- Reads the Location header (the destination URL)
- Automatically navigates to the destination
- The entire process is invisible to the visitor
Location Header in Different Redirects
| Status Code | Location Header Contains | Browser Behavior |
|---|---|---|
| 301 | New permanent URL | Navigate + cache |
| 302 | Temporary URL | Navigate, don’t cache |
| 307 | Temporary URL | Navigate, preserve method |
| 308 | New permanent URL | Navigate, preserve method, cache |
How Domain Forward Handles This
Domain Forward always sends an absolute URL in the Location header, including the correct protocol (https://). If path forwarding is enabled, the original path is appended to the destination URL in the header: Location: https://new-domain.com/original/path.
All destination URLs are explicitly configured — Domain Forward never produces open redirects where the destination could be manipulated by an attacker.
Related Terms
Related Features
Frequently
asked questions
It's a single line in the HTTP response: Location: https://new-domain.com/page. The browser reads this header and automatically navigates to the specified URL.
Yes. HTTP/1.1 allows relative URLs in the Location header, and the browser resolves them relative to the requested URL. However, using absolute URLs is more reliable and is what Domain Forward always uses.
The redirect fails. Browsers don't know where to go without a Location header. The user would see the 301 status code body content (if any) instead of being redirected.
Still Confused? Try It Free.
Set up your first domain forward in under 5 minutes. Free plan includes 5 domains.