Redirects & Rewrites
StackBlaze does not ship a _redirects file product or Ingress redirect UI. Handle path and host redirects in your web server or application code.
HTTPS on public URLs
Platform app URLs use *.stackblaze.app with TLS at the edge. Visitors should use https://. You do not configure an HTTPS redirect as a dashboard feature.
No platform _redirects file
A _redirects file in dist/ or out/ is not read by StackBlaze. If you need SPA fallbacks or 301s, configure nginx, Caddy, or your framework.
Web server (static frontend as a web service)
Deploy the built files as a web service and put redirect or rewrite rules in the server that serves dist / out.
nginx
# Permanent move
rewrite ^/old-path$ /new-path permanent;
# SPA: unknown paths serve index.html
location / {
try_files $uri $uri/ /index.html;
}Caddy
:{$PORT} {
root * /usr/share/caddy
file_server
try_files {path} /index.html
redir /old-path /new-path permanent
}SPA deep links
index.html for unknown paths. That is a start-command / image config concern, not a StackBlaze redirect product.Application-level redirects
For Node, Python, Go, and similar web services, implement redirects in your framework. The platform forwards the request; your process chooses the status and Location.
Express (Node.js)
app.get('/old-path', (req, res) => {
res.redirect(301, '/new-path')
})
app.get('/login', (req, res) => {
if (req.query.next) {
res.redirect(`/auth?return=${encodeURIComponent(req.query.next as string)}`)
} else {
res.redirect('/auth')
}
})Next.js (next.config.js)
/** @type {import('next').NextConfig} */
module.exports = {
async redirects() {
return [
{
source: '/blog/:slug',
destination: '/posts/:slug',
permanent: true,
},
]
},
}Django
from django.views.generic import RedirectView
from django.urls import path, re_path
urlpatterns = [
path('old-path/', RedirectView.as_view(url='/new-path/', permanent=True)),
re_path(r'^blog/(?P<slug>[\w-]+)/$',
RedirectView.as_view(url='/posts/%(slug)s/', permanent=True)),
]www and apex
If you attach both example.com and www.example.com, pick one as canonical in your app or web server and 301 the other. There is no Settings → Domains redirect toggle.