Is There Redirection Problem - Need Suggestion ?

by 6 replies
7
Hello warriors,

I am here to confirm one thing , that i am working on company;s website . that is suppose www.abc.com, when i am putting in browser http://www.abc.com, abc.com, www.abc.com it is redirecting to www.abc.com. So Is its redirection is working Okey ?

But there is one problem when i am putting http://abc.com then it is redirecting to abc.com Is there any problem?

If there is any problem then guide me the way to resolve it ?

I have named it abc in general as domain name , It is not my website.

And in google webmasters what i have to put in domain name , is it simply
Domain name with or without www, Should i have to put http before it

Kindly tell me the way.
#search engine optimization #problem #redirection #suggestion
  • [DELETED]
    • [1] reply
    • It should work with a 301 permanent redirection, Use .htaccess file to do this.
      Otherwise there is an option in Google Webmaster tool to set the preferred versions of your domain.

      Regards
      SPanda
      Ready to Go
      • [1] reply
  • Yes the redirection is working well.
    • [1] reply
    • In the .htaccess file do the following:

      Place either selection of code in the file and click on the Save Changes button at the top right corner of the screen. Be sure to replace 'example.com' with your actual domain name. NOTE: do not place both selections of code in the file as it will cause an error.

      #Force www:
      RewriteEngine on
      RewriteCond %{HTTP_HOST} ^example.com [NC]
      RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]

      or

      #Force non-www:
      RewriteEngine on
      RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
      RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
  • Typing http://domain and just the domain name into a browser should be exactly the same thing. Browsers dropped the requirement to specify the http:// component many years ago to make it quicker to type in.

    As to why you are getting a redirection without the http and no redirection with http could possibly be due to your browser and/or settings.

    Have you tried it with a different browser?

    You could also try using Redirect Detective - A Free Tool To Trace Where Redirects End Up to check your site.


    Please don't use real domains as examples. That's why example.com is reserved for this purpose.
    • [ 1 ] Thanks
  • If it is a Wordpress website then go to Settings > General and change both of these settings:
    WordPress Address (URL)
    Site Address (URL)
    to your desired URL.

Next Topics on Trending Feed