Add hostname attribute.