# Redirect absolute URL Server 2012 IIS

We are moving to a new domain and need to redirect users from the original to the new domain.

One of the things I need to do is have it set up so if a user has a saved link such as www.domain.com/questions it redirects to www.newdomain.com/questions.

We have multiple links that need to be redirected for SEO purposes. Apparently you can do this in apache using the htaccess file with the below code,

RewriteCond %{HTTP_HOST} ^DomainA.com
RewriteRule ^(.*) http://DomainB.com/\$1 [P]


My question is how can I achieve this using the web.config file in IIS or redirection.config?

<rule name="OriginalDomainRedirection">