> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/websites/redirects.md).

# Redirects

Send visitors from one URL to another when you move content or restructure URLs.

## Create a redirect in hPanel

1. Open your website dashboard.
2. Go to **Domains** → **Redirects** in the sidebar.
3. Fill in:
   * **Source URL** — URL to redirect from (e.g., `/old-page`)
   * **Destination URL** — target URL
   * **Redirect type** — 301 or 302
4. Click **Save**.

## Redirect types

| Type          | Code | Use when                                                     |
| ------------- | ---- | ------------------------------------------------------------ |
| **Permanent** | 301  | URL has moved for good. Search engines transfer link equity. |
| **Temporary** | 302  | Short-term redirect; the original may come back.             |

Use 301 for most cases — site restructures, domain migrations.

## Via `.htaccess`

### Simple redirect

```apacheconf
Redirect 301 /old-page https://yourdomain.com/new-page
```

### Wildcard redirect

Redirect all `/blog/*` to `/articles/*`:

```apacheconf
RedirectMatch 301 ^/blog/(.*)$ /articles/$1
```

### Entire domain

```apacheconf
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
```

### HTTP to HTTPS

```apacheconf
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
```

### `www` to non-`www`

```apacheconf
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
```

## Manage redirects

Redirects created in hPanel are listed in the **Redirects** panel — click to edit, or **Delete** to remove. `.htaccess` redirects are managed by editing the file.

***

*Last updated: July 22, 2026*
