Can I make 301 redirects on a Windows server (without access to IIS)?
-
Hey everyone,
I've been trying to figure out a way to set up some 301 redirects to handle the broken links left behind after a site restructuring, but I can only ever find information on 2 methods that I can't use (as far as I can tell). The first method is to do some stuff with an htaccess file, but that looks like it only works on Linux-based servers. The method described for Windows servers is generally to install this IIS rewrite/redirect module and run that, but I don't think our web hosting company allows users to log directly into the server, so I wouldn't be able to use the IIS thing.
Is there any other way to get a 301 redirect set up? And is this uncommon for a web hosting company to do, or do you all just run your sites on Linux-based servers or your own Windows machines?
Thanks!
-
This is a really common problem on shared Windows IIS-based hosting, Brian.
In addition to the web.config method Oleg mentions, there's another method if it's only for a few specific pages.
This method involves actually having a "placeholder" page on the server at the old URL. You then add a script to provide the 301 redirect. (Or just replace the content of the origianl page, if it's still on the server.)
For example:
On ASP.net you would create the page oldpagename.aspx and its content would be:
On ASP you'd create the placeholder oldpagename.asp and its content would be:
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "www.mydomain.com/newpagename.aspx"
%>Obviously this method doesn't scale as easily as the web.config method, but it's generally easier if you're just dealing with a few pages every once in a while.
Paul
-
Can I create a web.config file, or is that something that needs to be set up by the hosting company (or at least whoever has access to IIS)? I suppose I could just call the hosting company (as Irving recommended).
Thanks, guys!
-
Try this. It uses the web.config file which is accessible via FTP.
-
Have you called the hosting company? They may say that you need to switch to a Linux box, and they migrate everything over for you. Or maybe they can help you get your redirects in place on their end.
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
-
404 Pages. Can I change it to do this without getting penalized ? I want to lower our bounce rate from these pages to encourage the user to continue on the site
Hi All, We have been streaming our site and got rid of thousands of pages for redundant locations (Basically these used to be virtual locations where we didn't have a depot although we did deliver there and most of them was duplicate/thin content etc ). Most of them have little if any link value and I didn't want to 301 all of them as we already have quite a few 301's already We currently display a 404 page but I want to improve on this. Current 404 page is - http://goo.gl/rFRNMt I can get my developer to change it, so it will still be a 404 page but the user will see the relevant category page instead ? So it will look like this - http://goo.gl/Rc8YP8 . We could also use Java script to show the location name etc... Would be be okay ? or would google see this as cheating. basically I want to lower our bounce rates from these pages but still be attractive enough for the user to continue in the site and not go away. If this is not a good idea, then any recommendations on improving our current 404 would be greatly appreciated. thanks Pete
Intermediate & Advanced SEO | | PeteC120 -
Penalty after 301 redirect?
We run a training center. We had 1 main website and 2 dedicated websites to certain themes. The 2 dedicated websites are older and the main website is about 6 months old. The 2 dedicated websites had a top 5 ranking for their most important keywords. 2 weeks ago we imported all the content from the dedicated websites into the main website. Then immediately after we did a perfect 301 redirect of these websites to the main website. 2 SEO companies checked it for us and so I'm very sure this is done right. Google immediately caught this up and gave the main website a boost. We where in the top 10 for many important keywords for 1 week. The next week all our rankings dropped. We only have a top 50 ranking for 10 keywords. Before it was 75 keywords in the top 20. Do you know what could have caused this? Any suggestion, thought, ... is welcome!
Intermediate & Advanced SEO | | wellnesswooz0 -
Should /node/ URLs be 301 redirect to Clean URLs
Hi All! We are in the process of migrating to Drupal and I know that I want to block any instance of /node/ URLs with my robots.txt file to prevent search engines from indexing them. My question is, should we set 301 redirects on the /node/ versions of the URLs to redirect to their corresponding "clean" URL, or should the robots.txt blocking and canonical link element be enough? My gut tells me to ask for the 301 redirects, but I just want to hear additional opinions. Thank you! MS
Intermediate & Advanced SEO | | MargaritaS0 -
Multiple 301 Redirects for the Same Page
Hi Mozzers, What happens if I have a trail of 301 redirects for the same page? For example,
Intermediate & Advanced SEO | | Travis-W
SiteA.com/10 --> SiteA.com/11 --> SiteA.com/13 --> SiteA.com/14 I know I lose a little bit of link juice by 301 redirecting.
The question is, would the link juice look like this for the example above? 100% --> 90% --> 81% -->72.9%
Or just 100% -----------------------------------------> 90% Does this link juice refer to juice from inbound links or links between internal pages on my site? Thanks!0 -
Do I need to use canonical tags if I'm 301 redirecting pages?
I just took a job about three months and one of the first things I wanted to do was restructure the site. The current structure is solution based but I am moving it toward a product focus. The problem I'm having is the CMS I'm using isn't the greatest (and yes I've brought this up to my CMS provider). It creates multiple URL's for the same page. For example, these two urls are the same page: (note: these aren't the actual urls, I just made them up for demonstration purposes) http://www.website.com/home/meet-us/team-leaders/boss-man/
Intermediate & Advanced SEO | | Omnipress
http://www.website.com/home/meet-us/team-leaders/boss-man/bossman.cmsx (I know this is terrible, and once our contract is up we'll be looking at a different provider) So clearly I need to set up canonical tags for the last two pages that look like this: With the new site restructure, do I need to put a canonical tag on the second page to tell the search engine that it's the same as the first, since I'll be changing the category it's in? For Example: http://www.website.com/home/meet-us/team-leaders/boss-man/ will become http://www.website.com/home/MEET-OUR-TEAM/team-leaders/boss-man My overall question is, do I need to spend the time to run through our entire site and do canonical tags AND 301 redirects to the new page, or can I just simply redirect both of them to the new page? I hope this makes sense. Your help is greatly appreciated!!0 -
Access Denied
Our website which was ranking at number 1 in Google.co.uk for our 2 main search terms for over three years was hacked into last November. We rebuilt the site but had slipped down to number 4. We were hacked again 2 weeks ago and are now at number 7. I realise that this drop may not be just a result of the hacking but it cant' have helped. I've just access our Google Webmaster Tools accounts and these are the current results: 940 Access Denied Errors 197 Not Found The 940 Access Denied Errors apply to Wordpress Blog pages. Is it likely that the hacking caused the Access Denied errors and is there a clear way to repair these errors? Any advice would be very welcome. Thanks, Colin
Intermediate & Advanced SEO | | NileCruises0 -
How to use my time: Make my site bigger or make link wheels?
I have a site which consist of about 500 pages. It's the biggest of it's tiny niche, and I'm making a livin' out of it (it gets me clients). So this is important to me. I have access to tons and tons of non-copyrighted relevant texts. This text is not on the www, and thus would be unique to google. All though the text is relevant, it's not really useful for my visitors. How to use this text and get the most of my time spent? 1. Making thousands of articles on my website, with internal linking to the "selling" keyword pages? 2. Use text to make a lot of link wheels - eventually linking to my main site? Thanx a bunch! 😃 And if you have other suggestions I'd love to hear'em out 😃
Intermediate & Advanced SEO | | eirikte0 -
301 Redirects After Company Acquisition
We recently acquired a company, and now we are going to redirect all of the pages on their site to their respective pages on our site. Do we need to keep the original pages on their site active? For how long? Ideally, we would like to redirect everything and remove the old site entirely so we don't have to pay to keep hosting it. Is this possible? Thanks!
Intermediate & Advanced SEO | | pbhatt1