Confused!

So do you go by dpo to test? Because I see people saying they get a positive at 9dpo. My 9dpo is 6 days before my period. Can a test really detect that early??