Maybe Hogwarts is the answer for training stubborn dogs who never want to listen to their owners.

It seems to have worked for Dobby, a dog that responds when his owner shouts out spells from Harry Potter.

How To Teach Your Dog Harry Potter Spells

The three-year-old labradoodle named after the house-elf from the series is owned by Audriana Li of Toronto.

"I knew long before Dobby came along that I would train my future dog with Harry Potter spells instead of regular commands," Li said on Instagram. "I love feeling like I have real life magical powers every time I ask him to come, stay or play dead."

In a recent Newsweek interview, Li outlined how she trained Dobby to respond to spells commonly heard in the Harry Potter series.

Li said she taught Dobby the same way most other owners train their dogs, only she used the names of spells instead of common commands such as "sit" or "rollover."

Which Spells Has Dobby Learned?

Dobby picked up on the first command, "accio," when he was just 11 weeks old. Li uses that word to signal Dobby to "come."

"Avada Kedavra" is known as the "killing curse" in Harry Potter. When it comes to dog commands, this one made sense to use for "play dead"

READ MORE: Garbage-Fetching Dog Becomes Internet Darling After Viral Mishap

"Avada Kedavra is the most requested spell by people we meet out in the world who learn that Dobby knows Harry Potter commands," Li said in her post.

Dobby currently knows 15 Harry Potter-related spells including "go to Azkaban," which sends him trotting toward his crate. Here is a rundown of all of the spells he knows so far:

Travel to Hogwarts at this 'Harry Potter' Themed Cabin in Broken Bow, Oklahoma

You can live out your wizarding dreams at this "Harry Potter" themed cabin in Broken Bow, Oklahoma. The cabin is officially called "King's Cross" and is managed by Broken Bow Cabin Lodging. You can check out the full listing on Airbnb or on the Broken Bow Cabin Lodging official website. Check out the photos below!

Gallery Credit: Jeri Anderson

Check Out This Harry Potter Themed Cabin In The Mountains

More From WPDH-WPDA