Hono: Handling redirects

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


Redirects are common in Web Development. You can create a redirect using the c.redirect() method:

c.redirect('/go-there')

This creates a 302 redirect.

A 301 redirect is made in this way:

c.redirect('/go-there', 301)

Lessons in this unit:

0: Introduction
1: Your first Hono app
2: The Request object
3: Send a response to the client
4: Manage cookies
5: Work with HTTP headers
6: ▶︎ Handling redirects
7: Routing
8: JSX templates
9: Middleware
10: Hono on Node.js