Here's a super quick checklist that all web developers should have imprinted in the back of their minds when building websites. These factors are easy to forget and painful to rectify once the website reaches scale. It's far better to get this right on day one that fix things later. We've tried to remove all SEO jargon from the post!
Overall it's best not to change URL paths often. However, if you do change the URL for a web page then use a 301, not any other form of redirect like a 302. Google views a 301 as a permanent change so passes any authority that page has gathered from links to it.
People type in and link to both domain variations. In order to benefit from links pointing to both variations, make sure you 301 one to the other. Although pointless, people are used to using www and it increases click-through rates on Google ads so go with that unless there is a key reason not to.
Google is very hot on duplicate content. In short, Google aims for unique, valuable content in its search results. It provides a better experience for its users. One of the ways it does this is by penalising sites if it finds duplicate content. Obviously this means not scraping or using content from other websites in Google's index, but also duplicate content on your own site. Two versions of a page make it harder for Google to decide which one to rank so both with most likely suffer. Here are some things to watch out for:
Google views subdomains as separate websites (on the whole). It's generally far better to use sub-paths than sub-domains. This ensures that all the authority your site gains is applied to all sections of the site more effectively. For example, if you are installing a Wordpress blog, try to route it to a sub folder, rather than a sub domain.
It's generally annoying to implement and try to use hyphens rather than underscores. Google sees a hyphen as spaces in URLs, where underscores are not. e.g with /red-widget Google indexes your page with the keywords "red widget" with /red_widget Google indexes your page with "redwidget".
Ideally all your pages should have unique meta titles but it's easy to miss some out. As a fallback you should have a default meta title format. Make sure this isn't the same one you use for the homepage/index of the site. The homepage meta title is the most important so keep it unique and keyword rich.
If you want to learn more, check out Google's own basic SEO guide - it's a good place to start.