I transfered my domain to wordpress so when I type my domain name goes to the wordpress page. However, as soon as you do that the domain name changes and displays the wordpress url . How can I keep just the domain name even when redirecting?
you could have gone with managed Wordpress with godaddy. Without going into details, what you have now looks like a sub domain on your main Wordpress site.
But im not a Trouserpress expert, but it's just how it looks at a glance.
If I read your question correctly, you are currently forwarding your domain to a different URL. If you want to keep the domain name visible in the browser address bar, then you just need to "mask" the domain as well as forward it. Masking can be done within the forwarding interface in your domain manager. Here's a quick help article on it: https://www.godaddy.com/help/manually-forward-or-mask-your-domain-422