Back day. Even though deadlifts are mostly hamstrings/glutes, if you're actually moving decent weight (say 5+ plates for reps) and working close to failure on your last few reps I feel that it's dangerous to do leg work (like squats) immediately after deadlifts or you risk potentially injuring your lower back. On top of that, if you separate leg day and back day by 3-4 days or so, you can move a lot more weight when your hamstrings and glutes aren't fried like they would be immediately after deadlifts. Tired hamstrings and glutes will severely limit the weight you can squat, leg press, hack squat, etc etc quite easily.