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
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • 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.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      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.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • 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.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • 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.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • 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
    • 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
    3424
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    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

                              Got a burning SEO question?

                              Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                              Start my free trial


                              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

                              • Rogerperk

                                Best way to link to multiple location pages

                                I am a Magician and have multiple location pages for each county I cover. I currently have them linked off the menu under locations/ <county>and also in the footer</county> However I have heard that a link from the page is much stronger, so I am experimenting with removing the Menu & Footer link and just linking to these pages from within the content. It's not really a navigation item and most people come in through search to the right page. Am I diluting the link by having it in the Menu/Page and Footer? I read a long time ago that Google only considers the first link to a page and ignores the rest - is that the case? Thanks Roger https://www.rogerlapin.co.uk/

                                Technical SEO | | Rogerperk
                                0
                              • GoMentor

                                Best way to change URL for already ranking pages

                                Hello. I have a lot of pages that I'm optimising. The ones I'm focusing on right now is already ranking, but the URLs could be better (they don't include the keywords right now). However I'm worried that if I change the URLs they will drop in rankings or have to start over. I would of course set up 301 redirect, but is there more I need to do? What is the best way to change URL for already ranking pages?

                                Technical SEO | | GoMentor
                                0
                              • musthavemarketing

                                301 redirects delay in picking up

                                Hi I have been involved in the redesign/development of a website which has up until now had a lot of international traffic.  On day of migration I uploaded all the 301 redirects to the website (wordpress) using Simple 301 redirect plugin.  I tested a number of them and they appeared to be working. I also submitted the new sitemaps to Search Console. Since migration international traffic - particularly from countries such as india, Phillipines, Sri Lanka etc have significantly dropped off whereas the local traffic and some of the international traffic such as USA has remained fairly consistent.  Looking at Analytics and entrances recently it appears as though search results are/were showing a number of pages with 404's (one in particular which received significant traffic and for which I had created a 301 redirection) - I have checked this page using the old url and it re-directs correctly for me and today asked a colleague in India to also check - he is getting the redirection fine.  Does Google.in take a significantly longer time to pick these up in search results? Or am I missing something?

                                Technical SEO | | musthavemarketing
                                0
                              • Firestarter-SEO

                                What is the best way to redirect visitors to certain pages of your site based on their location?

                                One website I manage wants to redirect users to state specific pages based on their location. What is the best way to accomplish this? For example a user enters the through site.com but they are in Colorado so we want to direct them to site.com/colorado.

                                Technical SEO | | Firestarter-SEO
                                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
                              • TroyW

                                301 Redirect with index.asp

                                I am very new to all of this so forgive the newbie questions I will get better.   Ok so after starting a campaign I see that I have many issues including where some pages are being deemed as duplicate content. 1. The report says the http://lucid8.com has duplicate content on 2 other pages 2. When I look at them it shows that http://lucid8.com/index.asp and http://www.lucid8.com are duplicates. 3. Really these are the exactly the same page because the default page that is opened for www.lucid8.com http://www.lucid8.com etc always opens the index.asp page. 4. Now I read that I should do permanent redirects and how to do this via IIS and I tried to do a redirect from index.asp to www.lucid8.com but that does not work because www.lucid8.com is pointing to index.asp and so we end up in a circle. So the question is how do I get rid of these duplicate page references without causing problems. Thanks

                                Technical SEO | | TroyW
                                0
                              • EcomLkwd

                                Changing title tags, do we need 301 redirects

                                I found many duplicate title tags and I'm in the process of changing it  Do I need 301 redirects in place when I switch it? I am only changing the title tag. Also, we are switching over to a new site very soon, I am worried that we might be using too many 301 redirect "hops" because we are doing a lot of optimization as well. (video from matt cutts describing 301 redirects and hops: http://www.youtube.com/watch?v=r1lVPrYoBkA. Does anyone have any experience in doing too many redirect hops that it affected your rankings? Any good ideas to avoid this?

                                Technical SEO | | EcomLkwd
                                0
                              • bimmer540

                                A script to automatically write 301 redirect rules to htaccess?

                                I was wondering if anyone could help provide some resources on how to automatically write 301 redirect rules to htaccess.  Allow me to explain... I'm building a new website and the primary users are businesses.  They have their own profile pages on the site. The URL is based off of their Company Name. In the event that they decided to change their name... reasons being, perhaps they mispelled it the first time, or they're removing LLC or adding Inc, I want to also change the URL and redirect the old URL to the new URL. Since the URL is based off of their Company Name, making a change to the company name would make a change to the URL.  I know it doesn't have to work this way, but for our purpose this works best. In case the old URL had any links to it, I wanted to see if there was an way to automatically update an htaccess file with a 301 redirect from the old URL to the new one. Could anyone point me in the right direction of how to do this?  Perhaps a sample script.  I've done a lot of searches on Google and can't seem to find anything. e.g. Original:
                                Name:  XYZ Widgets
                                URL:  website.com/xyz-widgets New - business changes their company name in their profile:
                                Name:  XYZ Widgets, Inc.
                                URL:  website.com/xyz-widgets-inc Upon the user saving the changes in their profile, I'd like to write a 301 redirect to an htaccess file:
                                Redirect 301 /xyz-widgets http://www.website.com/xyz-widgets-inc I know how to manually write redirects and I've got a pretty smart web developer.  We've just never triggered a script to automatically write to an htaccess file before. Is this possible?  Any resources are appreciated.  Any security risks? Thanks!

                                Technical SEO | | bimmer540
                                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
                              Free SEO Tools
                              • Domain Authority Checker
                              • Link Explorer
                              • Keyword Explorer
                              • Competitive Research
                              • Brand Authority 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.