Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Requirements to setup IP Canonicalization on Apache web-server:
- 1) You must require a dedicated IP address.
- 2) Add a rewrite rule in .htaccess file.
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^xxx\.xxx\.xxx\.xxx [nc,or]
- RewriteCond %{HTTP_HOST} ^example.\.com [nc]
- RewriteRule (.*) http://www.example.com/$1 [R=301,L]
- Second variant:
- RewriteEngine on
- RewriteCond %{HTTP_HOST} ^xxx\.xxx\.xxx\.xxx$
- RewriteRule .* https://example.com [R,L]
- Replace xxx\.xxx\.xxx\.xxx with your dedicated IP address and replace example.com with your actual domain name.
- You can test it:
- https://seomator.com/free-tools/ip-canon-test
Advertisement
Add Comment
Please, Sign In to add comment