Announcement

Collapse
No announcement yet.

301 redirect for inner pages with new domain

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 301 redirect for inner pages with new domain

    Hi guys,
    I want to 301 redirect my old domain as well as with the new domain.
    I have added following rewrite code in htaccess file.

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^OldDomain.com
    RewriteRule (.*) http://NewDomain.com/$1 [R=301,L]
    But above code doesn’t work for inner pages.
    How to do this?

  • #2
    Hi Moriana,

    Write below 301 redirect code into your .htaccess file that is hosted in "OldDomain.com"s web root directory.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} OldDomain\.com$
    RewriteRule ^(.*) http://www.NewDomain.com/$1 [R=301,L]
    </IfModule>

    Comment


    • #3


      We just did this for a brand. Results were surprising. Small site, service + city niche. We increased rankings for some of the newer pages and completely dropped off the index for old ones. (they were fluctuating at the 192.168.100.1 192.168.1.1 time)
      Last edited by winkibili; 02-06-21, 10:16 AM.

      Comment

      Working...
      X