: 301 redirects.... www. > http ... the entire sitemap I submitted a duplicate sitemap some time back to incorporate the www. addresses when I saw my site was not directing there when I typed
I submitted a duplicate sitemap some time back to incorporate the addresses when I saw my site was not directing there when I typed it directly in the address bar. As I have edited my site and become better understanding of SEO I have done many 301 redirects for replaced pages, individually. No problem. Now I want to redirect the entire sitemap to my http sitemap. Must I redirect the entire mass of 4000+ urls individually or am I able to write a site level redirect... ie. site map directed to sitemap. The maps are identical except for the addition in the later one. The map has 105 listed urls while the http has 543. Any suggestions or knowledge concerning my best move???
More posts by @Lee4591628
1 Comments
Sorted by latest first Latest Oldest Best
You can use a single rule to redirect the entire site. Both of the following methods will redirect the following urls properly
www.example.com/ -> example.com/ http://www.example.com/page.html -> example.com/page.html http://www.example.com/directory/page.html -> example.com/directory/page.html
If you have access to your httpd.conf file, you can redirect the entire site using a virtual host directive. This is better for performance that using .htaccess and rewrite rules.
<VirtualHost *>
ServerName example.com Redirect 301 / example.com/ </VirtualHost>
If both your www and non-www hosts are served out of the same directory (and your host doesn't give you access to http.conf), you will need to use the following rewrite rules in your .htaccess file.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ %1/ [R=301,L]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.