add static dns

hi
I need add DNS to Mikrotik and use this command for this:
ip DNS static add address=127.0.0.1 name=sample.comafter this command I have sample.com but I want too www.sample.com but when I add this see this error:
entry already exists

You probably already have a static DNS entry for www.sample.com.

Execute


/ip dns static export

to verify you current configuration.

no, I haven’t.
I just want to add domain with www and without this but cant

everything works, added 2 static entries

ip dns static export
---
add address=127.0.0.1 name=sample.com
add address=127.0.0.1 name=www.sample.com

Which version of RouterOS are you running? Can you post the output of /ip dns static export here?

Dear Majid,

Please check your ip/dns configuration and you need to set your router address into “ip dns set servers=router-address” then you need to go to the ip firewall nat and write dns-proxy rule there for protocol=udp and destionation port 53.
In static dns settings if you write “sample.com” you need to browse just sample.com to open you router webfig page and also if you put www.sample.com in your routers static dns page you need to browse www.sample.com.

Best Regards,