Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I used the native URL-Rewrite module to rewrite (not redirect) a URL, does it return 302, 301, or 200? Is this method OK to use for a permanent URL rewrite?

Here is sample code for the redirect:

            <rule name="Rewriter" patternSyntax="ExactMatch" stopProcessing="true">
                <match url="foobar" />
                <action type="Rewrite" url="/actual/foobar.aspx" />
share|improve this question

Since the rule is only rewriting the URL, it should return a standard '200' HTTP header code (assuming there are no other errors). If you had used a redirect action type instead of rewrite, then you would have received a 301 or 302 HTTP response code depending on how the rule was configured. There are a variety of tools available that you can install on your local client to view the HTTP response codes that are being returned to the browser. A very popular one is Fiddler which provides a lot of monitoring details. These types of tools can be very useful when debugging rewrite and redirect rules.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.