1. First to generate a .htaccess file you must enable "Friendly URL: at Preferences >> SEO & URLs.
2. You may also enable Canonical url for redirecting example.com to www.example.com. Effective for SEO. (Recommended, but your theme must be compliant).
3. You can now generate a .htaccess file at Tools >> Generators.
4. You can also generate robots.txt for restricting search-engine crawlers from crawling certain pages of your website such as your about page, login page etc.