I have example.com, which points to web server using A records, I want to redirect all traffic from www.example.com to example.com.
As far as i know these are methods,
- 301 HTML redirect from www to
example.com - Add CNAME alias for www to @
- Add A record for www to webserver IP
What is the best way to do it without affecting my search engine ranking?
