FWIW if you use Bash shell you can also use history expansion to shorten the mkdir && cd line further (the line already includes tilde expansion):
mkdir ~/www/example.com && cd !$
!$ is the last argument of the preceding command