Use a constraint that accepts dot character.
get 'sites/:site_name/plans', constraints: { site_name: /[a-zA-Z0-9\.]+/ }
From the doc:
By default, dynamic segments don't accept dots - this is because the dot is used as a separator for formatted routes. If you need to use a dot within a dynamic segment, add a constraint that overrides this – for example, id: /[^/]+/ allows anything except a slash.