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
-
Website Redesign, 301 Redirects, and Link Juice
I want to change my client’s ecommerce site to Shopify. The only problem is that Shopify doesn’t let you customize domains. I plan to: keep each page’s content exactly the same keep the same domain name 301 redirect all of the pages to their new url The ONLY thing that will change is each page’s url. Again, each page will have the exact same content. The only source of traffic to this site is via Google organic search and sales depend on the traffic. There are about 10 pages that have excellent link juice, 20 pages that have medium link juice, and the rest is small link juice. Many of our links that have significant link juice are on message boards written by people that like our product. I plan to change these urls and 301 redirect them to their new urls. I’ve read tons of pages online about this topic. Some people that say it won’t effect link juice at all, some say it will might effect link juice temporarily, and others are uncertain. Most answers tend to be “You should be good. You might lose some traffic temporarily. You might want to switch some of your urls to the new structure to see how it affects it first.” Here’s my question: 1) Has anyone ever done changed a url structure for an existing website with link juice? What were your results and do you have a definitive answer on the topic? 2) How much link juice (if any) will be lost if I keep all of the exact content the same but only change each page’s url? 3) If link juice is temporarily lost and then regained, how long will it be temporarily lost? 1 week? 1 month? 6 months? Thanks.
Intermediate & Advanced SEO | | kirbyf0 -
I've got duplicate pages. For example, blog/page/2 is the same as author/admin/page/2\. Is this something I should just ignore, or should I create the author/admin/page2 and then 301 redirect?
I'm going through the crawl report and it says I've got duplicate pages. For example, blog/page/2 is the same as author/admin/page/2/ Now, the author/admin/page/2 I can't even find in WordPress, but it is the same thing as blog/page/2 nonetheless. Is this something I should just ignore, or should I create the author/admin/page2 and then 301 redirect it to blog/page/2?
Intermediate & Advanced SEO | | shift-inc0 -
Domain switch planned - new domain accessible - until the switch: redirect from new to old domain with 307?
Hi there, We are going to switch our local domain oldsite.at to newsite.com in November. As our IT department wants to use the newsite.com already for email traffic till then, the domain newsite.com has to be accessible for public and currently shows the default Apache page without useful content. The old domain has quite some trust, the new domain is a first time registered domain (not known by search engines yet and no published anyhow). The domain was parked till now. I am aware of the steps to take for the switch itself, but: **what to do with the newsite.com domain until everything is prepared for the switch? **I suppose users or search engines find the domain and as there is no useful information available it harms us already. My idea was to 307 redirect newsite.com to the oldsite.at but the concern is that this causes problems as soon as we switch the domain and redirecting with 301 from oldsite.at to newsite.com? Do you have any objections or other recommendations? Thank you a lot in advance.
Intermediate & Advanced SEO | | comicron0 -
301 redirect with /? in URL
For a Wordpress site that has the ending / in the URL with a ? after it... how can you do a 301 redirect to strip off anything after the / For example how to take this URL domain.com/article-name/?utm_source=feedburner and 301 to this URL domain.com/article-name/ Thank you for the help
Intermediate & Advanced SEO | | COEDMediaGroup0 -
Buying Domains from an auction and 301 redirecting to your new site.
Lets say I have a website in not to competitive niche. I was considering buying a few aged domains from godaddy auctions and 301 redirecting them to my new domain. Can this alone be enough to rank pretty high for a uncompetitive niche? Can this also be a link building technique in itself since the link juice from the domain purchased carries over? Thanks
Intermediate & Advanced SEO | | junkcars0 -
301 redirect hell.... How do you de-commission an old site
Hi SEO experts: We operate a vacation rental website and around 1 year ago moved to a different platform. Because our pages are arranged by location (what we refer to as Locales) we need to put 301 redirects for all the old locale pages. So for example: www.example.com/__Skeggness.cfm redirects to www.example/com/vacation-rentals/locale/skeggness But here's the problem: We can't seem to get Google to drop those old __{locale_name}.cfm pages... even after over 12-months of the new site going live! Other clues we've noticed: The old underscore URLs show up in our SERP sub-links Sometimes google shows the new page title and description but attributes it to the __{locale_name}.cfm URL (aghh!!!) One suggestion we received was to use the URL removal tool in Google WMT.... But given we have 1,000's of locales i don't see that as being affective. Questions: Any suggestions on how to get Google to drop these old URLs and use the new ones? Is this situation hurting our SEO? Or do you think its benign... and I should just take a deep breath.... and relax at little more...
Intermediate & Advanced SEO | | AABAB0 -
301 a page and then remove the 301
I have a real estate website that has a city hub page. All the homes for sale within a city are linked to from this hub page. Certain small cities may have one home on the market for a month and then not have any homes on the market for months or years. I call them "Ghost Cities". This problem happens across many cities at any point in time. The resulting city hub pages are left with little to no content. We are throwing around the idea of 301 redirecting these "Ghost City" pages to a page higher up in the hierarchy (Think state or county) until we get new homes for sale in the city. At that point we would remove the 301. Any thoughts on this strategy? Is it bad to turn 301s on and off like that? Thanks!
Intermediate & Advanced SEO | | ChrisKolmar0 -
301 Redirect To Corresponding Link No Matter The URL?
Hey guys I have hosting on Host Gator with I believe an apache web server. I need a code to put in the HT ACCESS to redirect all WWW URL's to their corresponding http URL. I haven't been able to get a code to work. For example, http://www.mysite.org/page1.html -> http://mysite.org/page1.html , without having to redirect hundreds of pages individually Here is the format my server uses in the HT ACCESS file for 301 redirects. RewriteCond %{HTTP_HOST} ^mysite.org$ [OR] RewriteCond %{HTTP_HOST} ^www.mysite.org
Intermediate & Advanced SEO | | DustinX
$RewriteRule ^Electric-Pressure-Cookers.html$ "http://mysite.org/Pressure-Cookers.html" [R=301,L] Thanks0