Search, Snippets, Tutorials

How to redirect old pages to new pages using htaccess

If file names or page urls of your website have changed during site redevelopment and you are worried about losing your existing search engine rankings, referrals, and bookmarked links, the most efficient solution is to create 301 Redirect to redirect old pages to the new ones. The code "301" means "moved permanently". There are many ways to create 301 redirects but assuming that your website is hosted on a Linux server, and you have access to .htaccess file on your server, you can simply redirect old pages to new pages as follows:

redirect 301 /my-old-page.htm /my-new-page.htm
redirect 301 /default.htm /index.htm
redirect 301 /location.htm /map.htm

Recommend Book

Twitter
LinkedIn
YouTube
Instagram