The safest way for a dog to ride in the car is secured in a crate or with a dog seat belt and harness combination.
No matter the method you use, your dog shouldn't sit in the front seat under any circumstances securing them in the cargo area or back seat behind a front seat is safer.