Don't leave your dog unattended outside, even briefly, on Halloween. Even dogs contained in fenced yards are not necessarily safe. Eggs, candy, and other materials may be thrown at the dog and consumed. Less benign items may be thrown at him which may cause serious damage. Sadly, many animals - especially black cats and dogs - may be the objects of serious, malicious abuse on this holiday. Mischievous youths may leave fence gates ajar or enter fenced areas, even if "beware of dog" signs are posted. Especially on Halloween, where visitors may be numerous and very disarming to the resident dog, make sure your dog does not have unsupervised access to visitors, nor they to him.
Keep your dog on a leash during Halloween. Even normally obedient dogs may be sufficiently aroused or frightened to behave unexpectedly on this holiday. Walk your dog at times when you are unlikely to encounter mobs of trick-or-treaters. Keep the dog restrained by a leash - even if you ordinarily use some sort of "invisible," electronic fence system - to prevent the dog from either charging towards trick-or-treaters or bolting away from them. You do not want to lose your dog at any time, but certainly not on Halloween where pranksters often cross the line and become cruel to animals.
Keep your dog away from the front door when you answer it for trick-or-treaters. It is actually best to keep the dog in another room in a crate or safe area, away from the door and ruckus.
Give the dog something to chew on. Just because your dog is locked away from the front door, doesn't mean he can't have a good time. Give him a rawhide bone, Kong or marrow bone stuffed with something tasty--peanut butter, cream cheese, liverwurst, etc. to keep him occupied. Not only will this give him something to do, but chewing helps reduce stress.
Be careful about what your dog eats on Halloween. Candy can make any of us nauseous in sufficient amounts, and dogs generally eat wrapper and all. Chocolate, in particular, is toxic to dogs if they consume enough of it. Some dogs will find Halloween make-up, candles, and other small-sized items appealing and try to eat them. The day after Halloween, you may find broken eggs strewn on lawns and streets. All of these temptations are items that your dog should not be allowed to eat. For a complete list of hazards to avoid and how, visit the ASPCA's website.
Try to foresee potential hazards on Halloween and prepare for them. As indicated, particular areas of concern are things that dogs might eat, interactions between dogs and children, and the general level of excitement or fear, which might create opportunities for escape or promote irritable behavior. Remember that dogs don't grasp that Halloween is a holiday, and they may find throngs of loud, raucous, peculiarly-costumed children genuinely frightening and traumatic. Be sensitive to your dog's stress level and safety, and have a Happy Halloween!