undefined
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.

    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
    • 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
3.4k
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 Feb 26, 2014, 7:53 AM

    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 Mar 14, 2014, 6:52 AM Mar 14, 2014, 6:52 AM

      Thanks a lot for your answer 🙂

      1 Reply Last reply Reply Quote 0
      • MichaelC-15022
        MichaelC-15022 last edited by Mar 14, 2014, 6:52 AM Mar 7, 2014, 3:27 PM

        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 Mar 14, 2014, 6:52 AM Reply Quote 1
        • 2MSens
          2MSens last edited by Mar 7, 2014, 9:15 AM Mar 7, 2014, 9:15 AM

          Any IIS expert around?.. 😃

          1 Reply Last reply Reply Quote 0
          • topic:timeago_earlier,8 days
          • Andy.Drinkwater
            Andy.Drinkwater @2MSens last edited by Feb 27, 2014, 9:33 AM Feb 27, 2014, 9:33 AM

            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 Feb 27, 2014, 9:32 AM Feb 27, 2014, 9:32 AM

              there is no .htaccess on IIS servers 😉

              Andy.Drinkwater 1 Reply Last reply Feb 27, 2014, 9:33 AM Reply Quote 0
              • 2MSens
                2MSens @vmialik last edited by Feb 27, 2014, 9:31 AM Feb 27, 2014, 9:31 AM

                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 Feb 27, 2014, 8:24 AM Feb 27, 2014, 8:24 AM

                  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 Feb 27, 2014, 9:32 AM Reply Quote 0
                  • vmialik
                    vmialik @2MSens last edited by Feb 27, 2014, 7:09 AM Feb 27, 2014, 7:09 AM

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

                    Andy.Drinkwater 2MSens 2 Replies Last reply Feb 27, 2014, 9:31 AM Reply Quote 1
                    • 2MSens
                      2MSens @vmialik last edited by Feb 27, 2014, 6:29 AM Feb 27, 2014, 6:29 AM

                      Hi Vadim,

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

                      vmialik 1 Reply Last reply Feb 27, 2014, 7:09 AM Reply Quote 0
                      • 2MSens
                        2MSens @Andy.Drinkwater last edited by Feb 27, 2014, 6:29 AM Feb 27, 2014, 6:29 AM

                        Hi Andy,

                        thanks, it works for IIS servers too?

                        • Benoit.
                        1 Reply Last reply Reply Quote 0
                        • vmialik
                          vmialik last edited by Feb 26, 2014, 8:10 AM Feb 26, 2014, 8:10 AM

                          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 Feb 27, 2014, 6:29 AM Reply Quote 0
                          • Andy.Drinkwater
                            Andy.Drinkwater last edited by Feb 26, 2014, 7:59 AM Feb 26, 2014, 7:59 AM

                            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 Feb 27, 2014, 6:29 AM Reply Quote 0
                            • 1 / 1
                            1 out of 13
                            • First post
                              1/13
                              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 | Jun 4, 2019, 1:46 AM | Rogerperk
                              0
                            • Emory_Peterson

                              301 Redirects Relating to Your XML Sitemap

                              Lets say you've got a website and it had quite a few pages that for lack of a better term were like an infomercial, 6-8 pages of slightly different topics all essentially saying the same thing.  You could all but call it spam. www.site.com/page-1 www.site.com/page-2 www.site.com/page-3 www.site.com/page-4 www.site.com/page-5 www.site.com/page-6 Now you decided to consolidate all of that information into one well written page, and while the previous pages may have been a bit spammy they did indeed have SOME juice to pass through. Your new page is: www.site.com/not-spammy-page You then 301 redirect the previous 'spammy' pages to the new page.  Now the question, do I immediately re-submit an updated xml sitemap to Google, which would NOT contain all of the old URL's, thus making me assume Google would miss the 301 redirect/seo juice.  Or do I wait a week or two, allow Google to re-crawl the site and see the existing 301's and once they've taken notice of the changes submit an updated sitemap? Probably a stupid question I understand, but I want to ensure I'm following the best practices given the situation, thanks guys and girls!

                              Technical SEO | Mar 23, 2015, 2:10 PM | Emory_Peterson
                              0
                            • CeeC-Blogger

                              301 vs 302 & Link Juice

                              Has any one come across any recent cases of a 302 link passing more link juice than before?

                              Technical SEO | May 28, 2013, 5:12 AM | CeeC-Blogger
                              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 | Apr 11, 2013, 10:03 AM | ulefos
                              1
                            • 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 | Mar 12, 2013, 4:36 PM | EcomLkwd
                              0
                            • 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 | Dec 31, 2012, 11:11 AM | RocketZando
                              0
                            • mamacassi

                              Internal vs external blog and best way to set up

                              I have a client that has two domians registered - one uses www.keywordaustralia.com the other uses www.keywordaelaide.com He had already bought and used the first domain when he came to me I suggested the second as being worth buying as going for a more local keyword would be more appropriate. Now I have suggested to him that a blog would be a worthy use of the second domain and a way to build links to his site - however I am reading that as all links will be from the same site it wont be worth much in the long run and an internal blog is better as it means updated content on his site. should i use the second domain for blog, or just 301 the second domain to his first domain. Or is it viable to use the second domain as the blog and just set up an rss feed on his page ? Is there a way to have the second domain somehow 'linked' to his first domain with the blog so that google sees them as connected ? NOOBIE o_0

                              Technical SEO | Oct 4, 2011, 6:42 PM | mamacassi
                              0
                            • BaseKit

                              How to safely reduce the number of 301 redirects / should we be adding so many?

                              Hi All, We lost a lot of good rankings over the weekend with no obvious cause. Our top keyword went from p3 to p12, for example. Site speed is pretty bad (slower than 92% of sites!) but it has always been pretty bad. I'm on to the dev team to try and crunch this (beyond image optimisation) but I know that something I can effect is the number of 301 redirects we have in place. We have hundreds of 301s because we've been, perhaps incorrectly, adding one every time we find a new crawl error in GWT and it isn't because of a broken link on our site or on an external site where we can't track down the webmaster to fix the link. Is this bad practice, and should we just ignore 404s caused by external broken URLs? If we wanted to reduce these numbers, should we think about removing ones that are only in place due to external broken URLs? Any other tips for safely reducing the number of 301s? Thanks, all! Chris

                              Technical SEO | Oct 5, 2011, 11:14 AM | BaseKit
                              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
                            • 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.