Best & easiest way to 301 redirect on IIS
-
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!
-
Thanks a lot for your answer
-
You have two options:
- Set it up in IIS Manager (best option, least overhead for the server, need no coding skills)
- 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:
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 -
Any IIS expert around?..
-
There - you can see how often I have worked on IIS servers
-
there is no .htaccess on IIS servers
-
No problem, I'll have a look for another website thanks
-
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
-
Bummer, I was not aware of that, its such an awesome plugin
-
Hi Vadim,
Thanks for your answer, however it looks that the redirection plugin works only for apache servers.
-
Hi Andy,
thanks, it works for IIS servers too?
- Benoit.
-
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!
-
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
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
What is the best way to change the URL along with the brand name change & having a minimal affect on the traffic
We are changing our brand name & hence our URL should change as well What is the best way to do that keeping in view we donot want to take a hit on the existing traffic to our ecommerce site as we get a good revenue from the site. Can someone give me the best strategy to approach this or share there experience with a similar issue they have dealt earlier
Technical SEO | | sharp_instincts1 -
Best way to handle URLs of the to-be-translated pages on a multilingual site
Dear Moz community, I have a multilingual site and there are pages with content that is supposed to be translated but for now is English only. The structure of the site is such that different languages have their virtual subdirs: domain.com/en/page1.html for English, domain.com/fr/page1.html for French and so on. Obviously, if the page1.html is not translated, the URLs point to the same content and I get warnings about duplicate content. I see two ways to handle this situation: Break the naming scheme and link to original English pages, i.e. instead of domain.com/fr/index.html linking to domain.com/fr/page1.html link to domain.com/en/page.html Leave the naming scheme intact and set up a 301 redirect so that /fr/page1.html redirects to /en/page1.html Is there any difference for the two methods from the SEO standpoint? Thanks.
Technical SEO | | Lomar0 -
Maintaining Link Value Of Old URLS With 301 Redirects
Large ecommerce site that has been around for a long time (15+ years.) During that time technology has changed a lot and we are running into issues maintaining 301 redirects for very old urls. For example we have a good amount of links to product and category pages. Some of the old links are to products that still exist and will exist for many years to come.(of note little to no traffic comes via these links. Most of them are close to 9 years old so they are buried deep within articles, forums, or websites) However as we make changes to the site and URL structure these old urls are taking up more resources to continue to maintain 301 redirects. I am Leary of no longer supporting them because I do not want it to impact rankings however there is concern on how much development time and technology resources it takes to continue to support as time goes on. Does anyone have experience handling redirects 3 or 4 url structures old? Looking for insight from someone who has crossed this bridge before.
Technical SEO | | RMATVMC0 -
Advice on whether we 301 redirect a page or update existing page?
Hi guys, any advice would be really appreciated. We have an existing page that ranks well for 'red widgets'. The page isn't monetised right now, but we're bringing in a new product onto our site that we optimised for 'blue widgets'. Unfortunately, not enough research was done for this page and we've now realised that consumers actually search for 'red widgets' when looking for the product we're creating as 'blue widgets'. The problem with this is that the 'red widgets' page is in a completely different category of our site than what it needs to be (it needs to be with 'blue widgets'). So, my question is; Should we do a 301 redirect from our 'red-widgets' page to our 'blue-widgets' page which we want to update and optimise the content on there for 'red-widgets'. Or, should we update the existing red-widgets page to have the right products and content on there, even thought it is in the wrong place of our site and users could get confused as to why they are there. If we do a 301 redirect to our new page, will we lose our rankings and have to start again, or is there a better way around this? Thanks! Dave
Technical SEO | | davo230 -
Can new content be added to a url which has a 301 redirect?
I am working on a site which is currently being redesigned. The home page currently ranks highly for relevant search terms, although on the new site the content on this page will be removed. The solution I was considering, to preserve rankings, was to move the content on the home page to a new url, and use a 301 redirect to help preserve rankings for that particular page. The question I have therefore, is am I able to add new content to the home page, and have this page freshly indexed accordingly? Any thoughts or suggestions would be most welcome. Thanks, Matt.
Technical SEO | | MatthewA0 -
I've consolidated other domains to a single one with 301 redirects, yet the new domain authority in MOZ is much less that the redirected ones. Is that right?
I'm trying to increase the domain authority of my main site, so decided to consolidate other sites. One of the other sites has a much higher domain authority, but I don't know why after a 301 redirect, the new site's domain authority hasn't changed on over a month. Does MOZ take account of thes types of things?
Technical SEO | | bytecgroup2 -
Proper way of handling wordpress urls and redirects?
I have recently changed some of my urls in wordpress + adding a sub category in the url structure. from
Technical SEO | | Livet
www.mydomain.se/category/subcategory to www.mydomain.se/category/subcategory/subcategory2/ My products are stil under www.mydomain.se/products/cool-product and are not affected. Should I 301 the old url (www.mydomain.se/category/subcategory) to the new (www.mydomain.se/category/subcategory/subcategory2/)? If that is so, can someone recommend a good 301 redirection plugin? Thanks!0 -
Suddenly Many 301 Redirects captured by SEOMOZ
On April the 7th SeoMOZ captured 6000 301 redirect on my site, but I cant seem to understand how SEOMOZ finds these links Example http://www.iphonegadget.dk/dk/apple-tilbeh-r-36/ipad-tilbeh-r-219/bilholder-239/index-2-4a.html Makes a 301 Redirect to the following page beneath SEOMOZ says http://www.iphonegadget.dk/dk/apple-tilbeh-r-36/ipad-tilbeh-r-219/bilholder-239/index-2.html The weird thing is that both urls work, but if i browse my site in a normal matter this link will never be created i that way. The -4a in the end os the link is not the normal link structure on the site and has never been like that before. So how does SEOMOZ Create that link? http://www.iphonegadget.dk/dk/apple-tilbeh-r-36/ipad-tilbeh-r-219/bilholder-239/index-2-4a.html Also google only has the right one that are this one beneath http://www.iphonegadget.dk/dk/apple-tilbeh-r-36/ipad-tilbeh-r-219/bilholder-239/index-2.html People would normal come to the category with this url http://www.iphonegadget.dk/dk/apple-tilbeh-r-36/ipad-tilbeh-r-219/bilholder-239/ And page 2 would be http://www.iphonegadget.dk/dk/apple-tilbeh-r-36/ipad-tilbeh-r-219/bilholder-239/index-2.html AND NOT http://www.iphonegadget.dk/dk/apple-tilbeh-r-36/ipad-tilbeh-r-219/bilholder-239/index-2-4a.html Can anyone find out what is going on?
Technical SEO | | noerdar0