Solved

How to properly do a 301 redirect for SEO?

Posted on 2011-09-19
2
656 Views
Last Modified: 2012-06-22
We are implementing a new website.  We will be switching web servers when we go live.
So, right now, I have the page example.com/example old 1.htm on the server #1, which I want to redirect to server #2 and the page of example.com/example NEW 1.aspx.

I have several hundred of these to setup, and am trying to figure out if I need to actually copy the original page from the old server and web to the new server and new web?  I did one that way and setup the redirect in IIS by selecting the file, choosing "HTTP Redirect" and inputting the new URL, and it worked like a charm but didnt' test perfectly on some online redirect testers.... However, I want to keep things simple in the file structure of the new website if possible and I don't want all my old web pages in there (even though they'd be redirected and innaccessible).

So, I setup a new record in the "Web.Config" file without physically moving the corresponding file from the old site to the new site and it was:
<location path="ABOUT US.htm">
        <system.webServer>
            <httpRedirect enabled="true" destination="/t-about.aspx" exactDestination="true" childOnly="true" httpResponseStatus="Permanent" />
        </system.webServer>
    </location>

This correctly redirected the file from the old one to the new one, but it won't register as a 301 redirect in any online redirect testers I try because my old website is a domain name right now and the new one is simply an IP Address for testing.

Does only using the Web.Config not register as an SEO friendly redirect because of the IP Address deal, did I do something wrong, or does the "About Us.htm" old file actually physically have to also be in the new site and be redirected?


Thanks for any help anyone provides!
0
Comment
Question by:ausman89
2 Comments
 
LVL 17

Accepted Solution

by:
Rovastar earned 500 total points
ID: 36561985
"This correctly redirected the file from the old one to the new one, but it won't register as a 301 redirect " 

What did it do then?

A 302?! You imply it redirected - how did it do this?

Also I would look at using URLrewrite module in IIS7.5 for this it  might make it easier.

0
 

Author Comment

by:ausman89
ID: 36564881
So I was getting a 400 bad request when I only added the code the web.config file and not directly adding the file from the old web to the new web.

The URL had a space in it, and as soon as I fill that space with a "%20" the redirect link testers online are all recognizing the redirects as 301 redirects.

Do you think Google will be smart enough to figure this out and not view it as a 400 bad request, but view it as a correct 301 redirect?  
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now