To ensure legality, it's best to stick to well - known and reputable streaming platforms. They have obtained the necessary rights to distribute the content. For Clannad After Story, checking official anime streaming services first is the safest bet to avoid any legal issues.
In most cases, if you are watching it on an official free - with - ads platform like Crunchyroll's free tier, it is legal. But if you are using unauthorized websites, it is not legal.