---
title: "Update domain nameservers"
method: PUT
path: "/api/domains/v1/portfolio/{domain}/nameservers"
tags: ["Domains: Portfolio"]
---

# Update domain nameservers

`PUT /api/domains/v1/portfolio/{domain}/nameservers`

Set nameservers for a specified domain.

Be aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable.

Use this endpoint to configure custom DNS hosting for domains.

## Path parameters

- `domain` string, required

## Request body

- DomainsV1PortfolioUpdateNameserversRequest
  - `ns1` string, required — First name server
  - `ns2` string, required — Second name server
  - `ns3` string — Third name server
  - `ns4` string — Fourth name server

## Response `200`

Success empty response

- CommonSuccessEmptyResource
  - `message` string

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

---

[API](https://skmtc.net/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.net/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/versions/796bd5194565/schema)
