When working with domain-mapped sites on WordPress.com, home_url() and site_url() will return different values.
home_url()returns the primary mapped domain (e.g. vippuppies.com)site_url()returns the *.wordpress.com URL (e.g. vippuppies.wordpress.com)
A few notes:
home_url()will only return the mapped domain on or after the init has fired. Calling it before then will return the.wordpress.comdomain.- If you accidentally use
site_url()in your templates, theme-side links will still redirect correctly to thehome_url()equivalent. home_url()is the preferred method, as it avoids the above redirect.