How to add DNS record to multiple domains via CLI?

Follow

Comments

4 comments

  • Avatar
    Miomir Besarabic

    Hi,

    It doesn't works. Nothing happen. No error message.

     

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Miomir Besarabic

    Feel free to create a support request about this.

    Investigation is required.

    0
    Comment actions Permalink
  • Avatar
    Fabian Marsiglione

    Hello

    very nice tutotial..

    Can you help me? i need to do this but i need to add in bulk this cname :

    www.domain.com --> CNAME --> domain.com

    The domains.txt is perfect.,

    But i can get to work the other part in this case.

    YOUR EXAMPLE 
    mail1.<domain.name> --> CNAME --> webmail.<domain.name> 
    WITH THIS COMMAND :
    cat /root/domains.txt | while read i; do plesk bin dns --add $i -cname mail1 -canonical  webmail.$i ;done


    In my case, the canonical parameter is the same domain, in this case $i

    so I´ve tried :
    cat /root/domains.txt | while read i; do plesk bin dns --add $i -cname www -canonical  $i ;done

    and get ERROR


    Can anyone help me with this?
    Thanks
    Fabian

     



    0
    Comment actions Permalink
  • Avatar
    Francisco Garcia

    Hi Fabian Marsiglione,

    Because for www record, this is added automatically when enabling/disabling www support for the domain:

    # plesk bin subscription -u example.com -www true/false

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request