We currently have a website running, domain.com
but we are going to change the website and we are working on the new website under dev.domain.com

it is a wordpress system we are putting together, is there a way to setup dev.domain.com as domain.com but still not be out in the public yet?
I have tried with dns forwarding with mask (godaddy) but failed,
I also tried with a cname, but failed.

What I would like, is to have minimal downtime, simply change DNS IP records and done, but still have the team develop in a almost realistic enviroment.

thank you

Just a comment about "change DNS IP records and". DNS changes have been known to take days or weeks so that change is not instant. Be sure you plan ahead for this. In other words, not an instant switch.

commented: Understood. +3

You can change the DNS of your domain to point to another domain. Normally it takes 24 to 48 hours for DNS propagation time. Next, you will also have to change the URL of your new site to point out to existing domain. For this you can take the help of plugins such as - Velvet Blues.