• majorAlexa

        See all notifications

        Skip to content
        Moz logo Menu open Menu close
        • Products
          • Moz Pro
          • Moz Pro Home
          • Moz Local
          • Moz Local Home
          • STAT
          • Moz API
          • Moz API Home
          • Compare SEO Products
          • Moz Data
        • Free SEO Tools
          • Domain Analysis
          • Keyword Explorer
          • Link Explorer
          • Competitive Research
          • MozBar
          • More Free SEO Tools
        • Learn SEO
          • Beginner's Guide to SEO
          • SEO Learning Center
          • Moz Academy
          • MozCon
          • Webinars, Whitepapers, & Guides
        • Blog
        • Why Moz
          • Digital Marketers
          • Agency Solutions
          • Enterprise Solutions
          • Small Business Solutions
          • The Moz Story
          • New Releases
        • Log in
        • Log out
        • Products
          • Moz Pro

            Your all-in-one suite of SEO essentials.

          • Moz Local

            Raise your local SEO visibility with complete local SEO management.

          • STAT

            SERP tracking and analytics for enterprise SEO experts.

          • Moz API

            Power your SEO with our index of over 44 trillion links.

          • Compare SEO Products

            See which Moz SEO solution best meets your business needs.

          • Moz Data

            Power your SEO strategy & AI models with custom data solutions.

          Let your business shine with Listings AI
          Moz Local

          Let your business shine with Listings AI

          Learn more
        • Free SEO Tools
          • Domain Analysis

            Get top competitive SEO metrics like DA, top pages and more.

          • Keyword Explorer

            Find traffic-driving keywords with our 1.25 billion+ keyword index.

          • Link Explorer

            Explore over 40 trillion links for powerful backlink data.

          • Competitive Research

            Uncover valuable insights on your organic search competitors.

          • MozBar

            See top SEO metrics for free as you browse the web.

          • More Free SEO Tools

            Explore all the free SEO tools Moz has to offer.

          NEW Keyword Suggestions by Topic
          Moz Pro

          NEW Keyword Suggestions by Topic

          Learn more
        • Learn SEO
          • Beginner's Guide to SEO

            The #1 most popular introduction to SEO, trusted by millions.

          • SEO Learning Center

            Broaden your knowledge with SEO resources for all skill levels.

          • On-Demand Webinars

            Learn modern SEO best practices from industry experts.

          • How-To Guides

            Step-by-step guides to search success from the authority on SEO.

          • Moz Academy

            Upskill and get certified with on-demand courses & certifications.

          • MozCon

            Save on Early Bird tickets and join us in London or New York City

          Unlock flexible pricing & new endpoints
          Moz API

          Unlock flexible pricing & new endpoints

          Find your plan
        • Blog
        • Why Moz
          • Digital Marketers

            Simplify SEO tasks to save time and grow your traffic.

          • Small Business Solutions

            Uncover insights to make smarter marketing decisions in less time.

          • Agency Solutions

            Earn & keep valuable clients with unparalleled data & insights.

          • Enterprise Solutions

            Gain a competitive edge in the ever-changing world of search.

          • The Moz Story

            Moz was the first & remains the most trusted SEO company.

          • New Releases

            Get the scoop on the latest and greatest from Moz.

          Surface actionable competitive intel
          New Feature

          Surface actionable competitive intel

          Learn More
        • Log in
          • Moz Pro
          • Moz Local
          • Moz Local Dashboard
          • Moz API
          • Moz API Dashboard
          • Moz Academy
        • Avatar
          • Moz Home
          • Notifications
          • Account & Billing
          • Manage Users
          • Community Profile
          • My Q&A
          • My Videos
          • Log Out

        The Moz Q&A Forum

        • Forum
        • Questions
        • My Q&A
        • Users
        • Ask the Community

        Welcome to the Q&A Forum

        Browse the forum for helpful insights and fresh discussions about all things SEO.

        1. Home
        2. SEO Tactics
        3. Technical SEO
        4. Best & easiest way to 301 redirect on IIS

        Moz Q&A is closed.

        After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

        Best & easiest way to 301 redirect on IIS

        Technical SEO
        4
        13
        3428
        Loading More Posts
        • Watching

          Notify me of new replies.
          Show question in unread.

        • Not Watching

          Do not notify me of new replies.
          Show question in unread if category is not ignored.

        • Ignoring

          Do not notify me of new replies.
          Do not show question in unread.

        • Oldest to Newest
        • Newest to Oldest
        • Most Votes
        Reply
        • Reply as question
        Locked
        This topic has been deleted. Only users with question management privileges can see it.
        • 2MSens
          2MSens last edited by

          Hi all,

          What is the best and easiest way to 301 redirect URLs on IIS server?

          I got access to the FTP and WordPress back office, but no access to the server admin.

          Is there an easy way to create 301 redirect without having to always annoy the tech in charge of the server?

          Thanks!

          1 Reply Last reply Reply Quote 0
          • 2MSens
            2MSens @MichaelC-15022 last edited by

            Thanks a lot for your answer 🙂

            1 Reply Last reply Reply Quote 0
            • MichaelC-15022
              MichaelC-15022 last edited by

              You have two options:

              1. Set it up in IIS Manager (best option, least overhead for the server, need no coding skills)
              2. Code it in classic ASP in a global include file that all pages reference before sending content back to the browser.

              Here's a great article that walks you through the IIS config option.  For this, you need access to IIS Manager:

              http://www.proworks.com/blog/2010/02/11/adding-a-301-redirect-in-iis-for-individual-pages-with-non-aspx-extensions/

              Sounds like that option is unavailable to you however.

              For the other option:  your site probably has a file or two that's included at the start of all web pages.  (If not, you can add it).  In that file, you'll want to check the URL passed in like this:

              Dim sThisPage                = Request.ServerVariables("SCRIPT_NAME")

              If (LCase(sThisPage) = "/oldpage.aspx") Then

              Response.Status            = "301 Moved Permanently"
                      Response.AddHeader        "Location", "http://" & sThisServer & "/newpage.aspx"
                      Response.End
              End If

              2MSens 1 Reply Last reply Reply Quote 1
              • 2MSens
                2MSens last edited by

                Any IIS expert around?.. 😃

                1 Reply Last reply Reply Quote 0
                • Andy.Drinkwater
                  Andy.Drinkwater @2MSens last edited by

                  There - you can see how often I have worked on IIS servers 😉

                  1 Reply Last reply Reply Quote 1
                  • 2MSens
                    2MSens @Andy.Drinkwater last edited by

                    there is no .htaccess on IIS servers 😉

                    Andy.Drinkwater 1 Reply Last reply Reply Quote 0
                    • 2MSens
                      2MSens @vmialik last edited by

                      No problem, I'll have a look for another website 😉 thanks

                      1 Reply Last reply Reply Quote 0
                      • Andy.Drinkwater
                        Andy.Drinkwater @vmialik last edited by

                        Nor was I.

                        If you have FTP access, you might then have to work in the .htaccess file and build the redirects in there.

                        -Andy

                        2MSens 1 Reply Last reply Reply Quote 0
                        • vmialik
                          vmialik @2MSens last edited by

                          Bummer, I was not aware of that, its such an awesome plugin

                          Andy.Drinkwater 2MSens 2 Replies Last reply Reply Quote 1
                          • 2MSens
                            2MSens @vmialik last edited by

                            Hi Vadim,

                            Thanks for your answer, however it looks that the redirection plugin works only for apache servers.

                            vmialik 1 Reply Last reply Reply Quote 0
                            • 2MSens
                              2MSens @Andy.Drinkwater last edited by

                              Hi Andy,

                              thanks, it works for IIS servers too?

                              • Benoit.
                              1 Reply Last reply Reply Quote 0
                              • vmialik
                                vmialik last edited by

                                Hi Benoit,

                                Yes, Andy is totally on it. Server side redirects are faster, however if you have Wordpress a plugins make it so much easier and convenient.

                                Also if you want other powerful features like: 404 error monitoring - captures a log of 404 errors and allows you to easily map these to 301 redirects, and more Try Redirection plugin

                                Hope this Helps!

                                2MSens 1 Reply Last reply Reply Quote 0
                                • Andy.Drinkwater
                                  Andy.Drinkwater last edited by

                                  Absolutely - Install this plugin: http://wordpress.org/plugins/simple-301-redirects/

                                  I use this on a couple of my own sites and it works a treat.

                                  -Andy

                                  2MSens 1 Reply Last reply Reply Quote 0
                                  • 1 / 1
                                  • First post
                                    Last post

                                  Browse Questions

                                  Explore more categories

                                  • Moz Tools

                                    Chat with the community about the Moz tools.

                                  • SEO Tactics

                                    Discuss the SEO process with fellow marketers

                                  • Community

                                    Discuss industry events, jobs, and news!

                                  • Digital Marketing

                                    Chat about tactics outside of SEO

                                  • Research & Trends

                                    Dive into research and trends in the search industry.

                                  • Support

                                    Connect on product support and feature requests.

                                  • See all categories

                                  Related Questions

                                  • Kilgray

                                    Robots txt. in page with 301 redirect

                                    We currently have a a series of help pages that we would like to disallow from our robots txt. The thing is that these help pages are located in our old website, which now has a 301 redirect to current site. Which is the proper way to go around? 1- Add the pages we want to disallow to the robots.txt of the new website? 2- Break the redirect momentarily and add the pages to the robots.txt of the old one? Thanks

                                    Technical SEO | | Kilgray
                                    0
                                  • Tintanus

                                    Max Number of 301 Redirections?

                                    Hi, We currently made a re-design of a website and we changed all our urls to make them shorter. I made more than 300 permanent redirections but plenty more are needed since WMT is showing some more 404s from old urls that I hadn't seen because they were dynamic. The question is, please, is there a limit? I think we have more than 600 already. We don't want to create a php commando to redirect all the old ones to our home, we are redirecting them to their correspondent url. By the way, Im doing them with the 301 method in .htaccess. Thanks in advance.

                                    Technical SEO | | Tintanus
                                    0
                                  • vmsolu

                                    How to redirect 302 status to 301 status code using wordpress

                                    I just ran the link opportunity option within site explorer and it shows that 31 pages are currently in a 302 status.  Should I try to convert the 302's to 301's?  And what is the easiest way to do this? I see several wordpress plugins that claim to do 301 redirects but I don't know which to choose. Any help would be greatly appreciated!

                                    Technical SEO | | vmsolu
                                    0
                                  • praveen439

                                    Sudden drop in Rankings after 301 redirect

                                    Greetings to Moz Community. Couple of months back, I have redirected my old blog to a new URL with 301 redirect because of spammy links pointed to my old blog. I have transfer all the posts manually, changed the permalink structure and 301 redirected every individual URL. All the ranking were boosted within couple of weeks and regained the traffic. After a month I have observed, the links pointed to old site are showing up in Webmaster Tools for the new domain. I was shocked (no previous experience) and again Disavowed all links. Today, all the positions went down for new domain. My questions are: 1. Did the Disavow tool worked this time with new domain? All the links pointed to old domain were devaluated? Is this the reason for ranking drop? Or 2. 301 Old domain with Unnatural links causes the issue? 3. Removing 301 will help to regain few keyword positions? I'm taking this as a case study. Already removed the 301 redirect. Looking for solid discussion.Thanks.

                                    Technical SEO | | praveen439
                                    0
                                  • Therealmattyd

                                    301 Redirects in subfolders

                                    Hi, we're making our site into a static site but I would like to transfer the Google juice. Most of the links and database exist on subfolders though. Could I simply do 301 redirects on the subfolders and retain the value or does it have to be on the full domain?

                                    Technical SEO | | Therealmattyd
                                    0
                                  • ulefos

                                    Remove html file extension and 301 redirects

                                    Hi Recently I ask for some work done on my website from a company,  but I am not sure what they've done is right.
                                    What I wanted was html file extensions to be removed like
                                    /ash-logs.html to /ash-logs
                                    also the index.html to www.timports.co.uk
                                    I have done a crawl diagnostics and have duplicate page content and 32 page title duplicates. This is so doing my head in please help This is what is in the .htaccess file <ifmodule pagespeed_module="">ModPagespeed on
                                    ModPagespeedEnableFilters extend_cache,combine_css, collapse_whitespace,move_css_to_head, remove_comments</ifmodule> <ifmodule mod_headers.c="">Header set Connection keep-alive</ifmodule> <ifmodule mod_rewrite.c="">Options +FollowSymLinks -MultiViews</ifmodule> DirectoryIndex index.html RewriteEngine On 
                                     # Rewrite valid requests on .html files  RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^ %{REQUEST_URI}.html?rw=1 [L,QSA] 
                                     # Return 404 on direct requests against .html files RewriteCond %{REQUEST_URI} .html$  
                                    RewriteCond %{QUERY_STRING} !rw=1 [NC]
                                     RewriteRule ^ - [R=404] AddCharset UTF-8 .html # <filesmatch “.(js|css|html|htm|php|xml|swf|flv|ashx)$”="">#SetOutputFilter DEFLATE #</filesmatch> <ifmodule mod_expires.c="">ExpiresActive On
                                    ExpiresByType image/gif "access plus 1 years"
                                    ExpiresByType image/jpeg "access plus 1 years"
                                    ExpiresByType image/png "access plus 1 years"
                                    ExpiresByType image/x-icon "access plus 1 years"
                                    ExpiresByType image/jpg "access plus 1 years"
                                    ExpiresByType text/css "access 1 years"
                                    ExpiresByType text/x-javascript "access 1 years"
                                    ExpiresByType application/javascript "access 1 years"
                                    ExpiresByType image/x-icon "access 1 years"</ifmodule> <files 403.shtml="">order allow,deny allow from all</files> redirect 301 /PRODUCTS http://www.timports.co.uk/kiln-dried-logs
                                    redirect 301 /kindling_firewood.html http://www.timports.co.uk/kindling-firewood.html
                                    redirect 301 /about_us.html http://www.timports.co.uk/about-us.html
                                    redirect 301 /log_delivery.html http://www.timports.co.uk/log-delivery.html redirect 301 /oak_boards_delivery.html http://www.timports.co.uk/oak-boards-delivery.html
                                    redirect 301 /un_edged_oak_boards.html http://www.timports.co.uk/un-edged-oak-boards.html
                                    redirect 301 /wholesale_logs.html http://www.timports.co.uk/wholesale-logs.html redirect 301 /privacy_policy.html http://www.timports.co.uk/privacy-policy.html redirect 301 /payment_failed.html http://www.timports.co.uk/payment-failed.html redirect 301 /payment_info.html http://www.timports.co.uk/payment-info.html

                                    Technical SEO | | ulefos
                                    1
                                  • RocketZando

                                    Best Way To Clean Up Unruly SubDomain?

                                    Hi, I have several subdomains that present no real SEO value, but are being indexed. They don't earn any backlinks either. What's the best way of cleaning them up? I was thinking the following: 1. Verify them all in Webmaster Tools. 2. Remove all URLs from the index via the Removal Tool in WMT 3. Add site-wide no-index, follow directive. Also, to remove the URLs in WMT, you usually have to block the URLs via /robots.txt. If I'd like to keep Google crawling through the subdomains and remove their URLs, is there a way to do so?

                                    Technical SEO | | RocketZando
                                    0
                                  • Veva

                                    Can I remove 301 redirects after some time?

                                    Hello, We have an very large number of 301 redirects on our site and would like to find a way to remove some of them. Is there a time frame after which Google does not need a 301 any more? For example if A is 301 redirected to B, does Google know after a while not to serve A any more, and replaces any requests for A with B? How about any links that go to A? Or: Is the only option to have all links that pointed to A point to B and then the 301 can be removed after some time? Thank you for you you help!

                                    Technical SEO | | Veva
                                    0

                                  Get started with Moz Pro!

                                  Unlock the power of advanced SEO tools and data-driven insights.

                                  Start my free trial
                                  Products
                                  • Moz Pro
                                  • Moz Local
                                  • Moz API
                                  • Moz Data
                                  • STAT
                                  • Product Updates
                                  Moz Solutions
                                  • SMB Solutions
                                  • Agency Solutions
                                  • Enterprise Solutions
                                  • Digital Marketers
                                  Free SEO Tools
                                  • Domain Authority Checker
                                  • Link Explorer
                                  • Keyword Explorer
                                  • Competitive Research
                                  • Brand Authority Checker
                                  • Local Citation Checker
                                  • MozBar Extension
                                  • MozCast
                                  Resources
                                  • Blog
                                  • SEO Learning Center
                                  • Help Hub
                                  • Beginner's Guide to SEO
                                  • How-to Guides
                                  • Moz Academy
                                  • API Docs
                                  About Moz
                                  • About
                                  • Team
                                  • Careers
                                  • Contact
                                  Why Moz
                                  • Case Studies
                                  • Testimonials
                                  Get Involved
                                  • Become an Affiliate
                                  • MozCon
                                  • Webinars
                                  • Practical Marketer Series
                                  • MozPod
                                  Connect with us

                                  Contact the Help team

                                  Join our newsletter
                                  Moz logo
                                  © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                                  • Accessibility
                                  • Terms of Use
                                  • Privacy

                                  Looks like your connection to Moz was lost, please wait while we try to reconnect.