Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

redirect 301 htaccess


Recommended Posts

I want to redirect the http:// to http://www. also I want the ip adres also redirect to http://www.

 

this is what I got already.

rewritecond %{http_host} ^americanbutt.nl [nc]
rewriterule ^(.*)$ http://www.americanbutt.nl/$1 [r=301,nc]

but I don't get the ip redirect also to www.

the ip adres is: 145.131.10.87

 

 

 

Link to comment
Share on other sites

I want to redirect the http:// to http://www. also I want the ip adres also redirect to http://www.

 

this is what I got already.

rewritecond %{http_host} ^americanbutt.nl [nc]
rewriterule ^(.*)$ http://www.americanbutt.nl/$1 [r=301,nc]

but I don't get the ip redirect also to www.

the ip adres is: 145.131.10.87

@dinopacho

 

a quick google found this example, not sure if it works

RewriteCond %{HTTP_HOST} ^12\.34\.56\.789$
RewriteRule ^(.*)$ http://www.domainname.com/$1 [L,R=301]
Link to comment
Share on other sites

Apparently that is not your IP address. You might want to check with your host as to which IP address should be used -- maybe you should be giving the nameserver IP and you're giving the server IP, or vice-versa? According to the host page, you can get there by entering the IP address, so possibly they capture IP address access and don't let you get to your site that way?

 

By the way, do you expect anyone to be coming in via an IP address? That would be rather unusual. Since directly entering that IP address does not take you to your site, but rather to your host, you need to get that cleared up before trying to redirect it.

Link to comment
Share on other sites

@@Papanco

 

Is this only for the http or also for the ip to www????

It is unnecessary for you to do that. Your non-www to www redirection is already working fine.

 

 

Why I want to redirect the ip to www,

Because I'm doing analyses for my website and now they say that the ip is not redirect to my webpage.

And that is bad for optimalizing the website.

I've never heard of anyone caring about redirecting IP addresses to a named domain. No one accesses a website via IP address, except when first setting it up and the domain name isn't active yet. But if you insist, ask your host what IP address should work to access your site. Once you can enter http://145.131.10.87(or whatever) in a browser and get to your store, you can then worry about doing a 301 redirect.

Link to comment
Share on other sites

  • 4 weeks later...

It is unnecessary for you to do that. Your non-www to www redirection is already working fine.

 

 

I've never heard of anyone caring about redirecting IP addresses to a named domain. No one accesses a website via IP address, except when first setting it up and the domain name isn't active yet. But if you insist, ask your host what IP address should work to access your site. Once you can enter http://145.131.10.87(or whatever) in a browser and get to your store, you can then worry about doing a 301 redirect.

 

Is this the DNSSEC query?

 

I ran a SEO analysis on various website online checkers, and they say that your website's IP should be security verified and point to the domain.

It says you have to do a DNSSEC with the hosting provider.

 

I'm not sure how true this is for SEO?

Link to comment
Share on other sites

@@MrPhil I think what the op is referring to is "ip Canonicalization". Some SEO companies are saying it is important, similar to redirecting non-www domain names to www domain names. I've not seen any proof of that and don't bother with it.

 

 

@@dinopacha

And that is bad for optimalizing the website.          

 

If a shared server isn't setup correctly and the IP between sites is shared and your site is not available for some reason, it is possible another site on the server will show instead. This is rare and shouldn't happen with most hosts and then only if your site isn't working. In other words, it's a non-issue. As long as using the redirect won't cause any problems with how your site is setup on the server, it won't hurt to make the change. But it isn't going to help with SEO.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...