Velcro. Little strips of velcro from any craft store or hardware store. I used 4 across the top. I had to cut the rug at that point. Just a warning let the velcro sit for at least 2 nights not stuck together to the gate or rug. Leave them separted on the gate and on the rug. If you don't they will peel off. I already had this happen.