Results 1 to 5 of 5

Thread: Best way to Redirect a domain name?

  1. #1
    Web Monkey MarkB's Avatar
    Join Date
    Nov 2003
    Location
    London, UK
    Posts
    1,783

    Best way to Redirect a domain name?

    Hi guys,

    I'm currently redirecting a domain name using an Apache rewrite, so all URLs link to, for example, www.olddomain.com/somefile.html will be redirected to www.newdomain.com/somefile.html

    This is the Apache rewrite I'm using (in httpd.conf):

    Code:
    ServerName olddomain.com
    ServerAlias www.olddomain.com
    RewriteEngine on
    RewriteRule ^/(.*) http://www.newdomain.com/$1 [L,R]
    However, Google is not updating with this change, and actually still indexing the old URL with the new content!!

    Any ideas of the best way to migrate domains, but keep direct links still operational?

    Mark

  2. #2
    žorn in the fast lane piniyini's Avatar
    Join Date
    Aug 2004
    Location
    Dewsbury, UK
    Posts
    53
    I'm no expert with htaccess, but if I were you I would try

    Code:
    [R=301,L]
    instead of

    Code:
    [L,R]
    [FONT=Fixedsys]my blog @ toseef.com

  3. #3
    Registered Dan Morgan's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    283
    As mentioned a 301 redirect is the correct way of telling the search engines the page has permanently moved. This is how I do it in .htaccess (I think someone from these boards gave me this in an earlier thread - what are the odds).

    Code:
    # olddomain.com/anything www.olddomain.com/anything anything.olddomain.com/anything
    # every.sub.domain.olddomain.com/anything
    RewriteCond %{HTTP_HOST} ^(.*)olddomain\.com$ [NC]
    # will be redirected to www.newdomain.com/anything
    RewriteRule ^.*$ http://www.newdomain.com%{REQUEST_URI} [R=301,L]
    [edit]
    Original thread here - http://www.websitepublisher.net/foru...searchid=23934
    [/edit]

  4. #4
    Web Monkey MarkB's Avatar
    Join Date
    Nov 2003
    Location
    London, UK
    Posts
    1,783
    Cheers guys - will try that tomorrow.

  5. #5
    4x4
    Join Date
    Oct 2004
    Posts
    1,043
    Yep! 301 - The search engines will then know where to go in the future.

Similar Threads

  1. PR7 domain or not?
    By Dan Morgan in forum Domain Names
    Replies: 12
    Last Post: 05-18-2004, 02:15 PM
  2. Old domain has PR4 - New domain has PR 0 - How to play this one?
    By Dan Morgan in forum Search Engine Optimization
    Replies: 19
    Last Post: 03-07-2004, 04:52 PM
  3. domain registration / trademark issue
    By dutch in forum Business and Legal Issues
    Replies: 2
    Last Post: 01-16-2004, 06:03 AM
  4. Domain name or site name for best SEO?
    By Nerveman in forum Search Engine Optimization
    Replies: 10
    Last Post: 12-21-2003, 11:12 AM
  5. Domain Names
    By HiddenVorlon in forum Search Engine Optimization
    Replies: 2
    Last Post: 09-13-2003, 12:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •