Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to add or modify DNS records for specific domain using CLI in Plesk for Linux

 
clidnsdns statisticsdomainslinux

Question

How to add or modify DNS records for the specific domain using CLI?

Answer

  1. Connect to the server using SSH.

    Note: If direct SSH access to the server is not possible, contact server administrator for further assistance.

  2.  Use the following command to add a DNS record for the domain example:

    # plesk bin dns --add example.com -srv sub.example.com -srv-service sip -srv-target-host sipserver.example.com -srv-protocol tcp -srv-port 5060 -srv-priority 0 -srv-weight 5

    where

    • example.com - domain to which the DNS record needs to be added.

    • -srv - type of DNS record.

    • -srv-service sip -srv-target-host sipserver.example.com -srv-protocol tcp -srv-port 5060 -srv-priority 0 -srv-weight 5 - additional parameters for specific DNS record type.

Other examples:

  • To create an A record for the domain example.com:

    # plesk bin dns -a example.com -a "" -ip 203.0.113.2

  • To delete an A record for the domain example.com:

    # plesk bin dns -d example.com -a "" -ip 203.0.113.2

  • To create NS record for the domain example.com:

    # plesk bin dns -a example.com -ns "" -nameserver ns1.example.com

  • To create PTR record:

    # plesk bin dns --set example.com -list “PTR,203.0.113.2,,24.;”

For other options and examples of using the CLI utility dns, see the following documentation article in Reference for Command-Line Utilities, Plesk for Linux: dns: DNS Zones on Domains

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Check Open Ports in Linux (Simple Commands & Tools)

Read More »

Linux Logs Explained

Read More »

DNS_PROBE_FINISHED_NXDOMAIN: What Is It And How To Fix The Problem

Read More »
Knowledge Base

Unable to start BIND DNS server in Plesk for Linux: “zone NS has no address records (A or AAAA)” or “zone has no NS records”

Read More »

Can’t apply DNS template to a migrated domain in Plesk

Read More »

How to use one set of nameservers for all domains in Plesk

Read More »

How to rebuild/reconfigure DNS configuration file and zone files of domains?

Read More »

Hosting Wiki

  • CLI
  • Server Redundancy
  • OpenStack
  • Linux Containers
  • AMP
  • Bare Metal Server
  • Transfer lock
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Domain Transfer
  • Domain
  • Plesk
  • Web Server
  • Static DNS
  • NS Record
  • DNS Server
  • DNS Forwarding
  • Reverse DNS
  • SSH
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family