Welcome to WebmasterWorld Guest from 54.167.175.107

Forum Moderators: Ocean10000 & incrediBILL & phranque

Newbie needs redirect help

301 redirect from old site to new site

   
8:40 pm on Aug 3, 2012 (gmt 0)

5+ Year Member



I'm very new to setting up a 301 redirect and I'm hoping that someone can help me.

I have a new website with a new domain. I need to set up 301 redirects for pages on my old site (and different domain) to pages on my new site.


1. Do I need to add any redirect rules in the .htaccess file on the old site/domain? If so, what do I put there? And how long do I leave it before I can close down and remove the site from the server?


2. What is the complete redirect code that I would need to place in the .htaccess file on the new site?


3. Should I also include a redirect for possible 404 pages on the old site and redirect them to the new site's home page? If so, where do I enter it and what is the code for that?


Thank you,
Ron
1:59 am on Aug 4, 2012 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



1. Do I need to add any redirect rules in the .htaccess file on the old site/domain?

ALL redirects will go on the old site. Once the request arrives at the new site, there should be no further redirects. The new site's htaccess will only be for people who requested the new domain in the first place.

2. What is the complete redirect code that I would need to place in the .htaccess file on the new site?

Oh, come on. You've been here since 2007. You know better.

:: shuffling papers ::


Why We Make You Do It Yourself

There are plenty of forums where you can post a "how-to" question and get a fairly immediate answer. The answer may even be correct. But WebmasterWorld is about teaching you how to do it yourself. That way you can roll your own htaccess-- not just for today's problem but for tomorrow's almost identical one.

Here is the analogy:

Your child's room needs cleaning. You know that you can clean it yourself much faster and better than if you have to stand over your child and force him to do it right. But if you do the "make him get it right" part often enough, you will have raised a child who knows how to clean his room-- and who will some day stand glowering over his own children in the same circumstances.

Some day, someone else will post a question in the WebmasterWorld forums and you'll say "Hey, I know the answer to that one!"

Besides, when someone with a low post count asks a question, that person may have posted the identical question in six different forums. They grab the first answer they get, and never even come back to the others. You can understand that this is infuriating for the person who took the time to compose an answer.
4:05 pm on Aug 4, 2012 (gmt 0)

5+ Year Member



Thanks Lucy.
I know, I know. Shame on me for asking. :)

Shocking as it is, it's my first time dealing with this situation of a new domain replacing an old one and setting up the 301 redirects. I'll find the correct rewrite code, but one last question ... how long do I leave the old domain running with the 301 redirects before I shut it down completely?

Thank you,
Ron
7:31 pm on Aug 4, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



You should leave the old domain online for as long as possible, hopefully for many years.

You do NOT need separate hosting for this redirect. Point all domains at one server and redirect non-canonical requests from there (back to new URL on the same server).
 

Featured Threads

Hot Threads This Week

Hot Threads This Month