---
title: "Add a new Rewrite rule"
method: POST
path: "/rewrite/add"
tags: ["rewrite"]
---

# Add a new Rewrite rule

`POST /rewrite/add`

## Request

- Base URL: `/control` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/control/rewrite/add`
- Auth: HTTP basic

## Request body

- RewriteEntry: Rewrite rule
  - `domain` string: Domain name
  - `answer` string: value of A, AAAA or CNAME DNS record

## Response `200`

OK.

---

[API](https://skmtc.dev/guardllamanet/apis/adguard-home.md) - [All operations](https://skmtc.dev/guardllamanet/apis/adguard-home/llms.txt) - [OpenAPI document](https://skmtc.dev/guardllamanet/apis/adguard-home/revisions/14ff21aeb363?raw)
