# Getting Started with Redirect

## What is the Redirect?

**Redirect** is an HTTP response that tells a browser to automatically load a different URL than the one requested.\
When a web server returns a redirect, it includes:

* An **HTTP status code** such as **301** (Permanent) or **302** (Temporary).
* A **Location header** that specifies the new target URL.

The browser follows this instruction seamlessly, sending the visitor to the new address.

## Why Use Redirect?

Redirects ensure that visitors always reach the correct destination, even if the original URL has changed. They provide a seamless browsing experience and help you avoid broken links or error pages.

Key benefits include:

* **Better user experience** – Automatically send visitors to the right page without interruptions.
* **SEO continuity** – Preserve search engine rankings when moving content or domains (301 redirects).
* **Flexibility** – Handle temporary needs like maintenance, campaigns, or rebranded pages with minimal effort.
* **Brand consistency** – Keep your audience engaged by guiding them to the right content under your chosen domain.

Without redirects, outdated or changed URLs may result in “404 Not Found” errors, reduced traffic, and lost customer trust.

{% hint style="info" %}
A redirect is not the same as a DNS record. DNS maps a domain to an IP, while a redirect changes the actual URL the browser loads.
{% endhint %}

## Redirect Types

There are three main types of redirects, each suited for different needs:

* **301 Permanent Redirect**\
  Use when a page or domain has moved permanently. Search engines update their index to the new URL, and ranking value (“SEO juice”) is transferred. Best for domain migrations or long-term changes.
* **302 Temporary Redirect**\
  Use for short-term changes. Visitors are redirected, but search engines keep the original URL indexed. Ideal for maintenance, seasonal promotions, or temporary campaigns.
* **Masking**\
  Keeps the original domain visible in the browser while showing content from another URL (also called *cloaking*). Useful for branding or simplified user experience, but may limit SEO value and is not recommended for most cases.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://clients.medianova.com/products/dns/redirect/getting-started-with-redirect.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
