301 Redirect for Hyphenated domains - Help

4 replies
  • SEO
  • |
Hi,

I have a domain seo-experts-india.in which is in wordpress blog. I tried all possible ways to redirect it from non www version to www version by editing .htaccess file . The .htaccess file will look like this :

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

I have added codes like this in .htaccess file

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^seo\-experts\-india\.in [NC]
RewriteRule ^(.*) httpwww[dot]seo-experts-india[dot]in/$1 [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

and
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^seo-experts-india.in [NC]
RewriteRule ^(.*)$ httpwww[dot]seo-experts-india[dot]in/$1 [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

note:[Dot] I m using because i cannot post links in this post
But all these case web browser not able to complete the request and resulting an error "This webpage has a redirect loop
The webpage at www[dot]seo-experts-india[dot]in has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer."

If any one knows this fix please provide the exact steps. its urgent
#301 #domains #hyphenated #redirect
  • Originally Posted by leapharris View Post

    Hi,

    I have a domain seo-experts-india.in which is in wordpress blog. I tried all possible ways to redirect it from non www version to www version by editing .htaccess file . The .htaccess file will look like this :

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    I have added codes like this in .htaccess file

    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^seo-experts-india.in [NC]
    RewriteRule ^(.*) httpwww[dot]seo-experts-india[dot]in/$1 [R=301,L]
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    and
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^seo-experts-india.in [NC]
    RewriteRule ^(.*)$ httpwww[dot]seo-experts-india[dot]in/$1 [R=301,L]
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    note:[Dot] I m using because i cannot post links in this post
    But all these case web browser not able to complete the request and resulting an error "This webpage has a redirect loop
    The webpage at www[dot]seo-experts-india[dot]in has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer."

    If any one knows this fix please provide the exact steps. its urgent

    Thanks By Share. Nice Update
    {{ DiscussionBoard.errors[4122971].message }}
  • Profile picture of the author daniel69
    Hi plz chk your PM as i am not able to submit the URL yet.
    {{ DiscussionBoard.errors[4123103].message }}
  • Profile picture of the author daniel69
    Hi try this:

    RewriteEngine On RewriteCond %{HTTP_HOST} !^www\(dot)seo\-experts\-india\(dot)in [NC] RewriteRule (.*) httpwww(dot)seo-experts-india.in/$1 [R=301,L]i have used the same code in my htaccess file.
    {{ DiscussionBoard.errors[4123113].message }}
    • Profile picture of the author paulgl
      Your code just does not look right.
      There are typos, for one.
      Too complicated for another.

      If you have cpanel, best way is to do it through that.

      Have no idea what server you have.

      Options +FollowSymLinks
      RewriteEngine on
      RewriteCond %{HTTP_HOST} ^example\.com
      RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]

      Much simpler looking, but may not work on your server, depending
      on type and settings.

      In the end, if a non-www and www take you to the same page,
      leave it alone. It's really no big deal, even though some think the
      sky is falling. It's a non-issue.

      Paul
      Signature

      If you were disappointed in your results today, lower your standards tomorrow.

      {{ DiscussionBoard.errors[4123230].message }}

Trending Topics