bleggee
asked on
Coding of .htaccess for canonical issue & robots.txt for sitemap
Can someone check this please ... Is this the correct coding for robots.txt if I put a sitemap.xml file in the web root folder:
User-agent: *
https://EXAMPLE.COM/sitemap.xml
and
Is this the correct coding for .htaccess if I want to direct all requests to the Non-www https version of a URL:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.EXAMPLE\.com [NC]
RewriteRule ^(.*)$ https://EXAMPLE.com/$1 [L,R=301]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://EXAMPLE.com/$1 [L,R=301]
Any advice appreciated!
User-agent: *
https://EXAMPLE.COM/sitemap.xml
and
Is this the correct coding for .htaccess if I want to direct all requests to the Non-www https version of a URL:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.EXAMPLE\.com [NC]
RewriteRule ^(.*)$ https://EXAMPLE.com/$1 [L,R=301]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://EXAMPLE.com/$1 [L,R=301]
Any advice appreciated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.