Airbnb has changed its rules for some Canadian rental properties after a shooting at a party held in a Toronto home that was rented through the popular website. The online rental marketplace will no longer allow customers who are under the age of 25 to rent out whole properties of any size in their home market, BBC reported.

The move is only a pilot and the company has not said whether it plans to expand the rules to other countries. These new restrictions do not apply to renters outside of 25 who are traveling farther away from home.

A row of wooden houses.

Aribnb is restricting people under the age of 25 from renting whole homes. Image source: Getty Images.

What is Airbnb doing?

Essentially, the company is trying to make sure that the houses in its inventory are not used for parties. Many property owners who rent their homes out through the platform include language that specifies how many people can be there or specifically forbids the property from being used for parties. Others, however, have more grey areas or omit specifically addressing that issue.

Why is Airbnb doing this?

The company wants to be proactive and avoid more cities passing rules that govern its use. Getting ahead of an event that left three dead is smart public relations for a company that plans to have an initial public offering (IPO) later this year.

Bad publicity can spook investors and the threat of regulation can do the same. This is Airbnb both wanting to prevent violence at the properties rented through the platform and trying to stay on top of a potentially damaging story.