In 2010, we spent several days in the Cique Terre area of Italy. There is a trail that connects the five towns that sit on the cliffs of the shore line. Over the course of our stay we walked almost all of the trail. Part of it was closed for repairs. One section of the walk was called Via dell'Amore and there we ran across an unusual practice that apparently has grown in popularity over the years.
Along one section where there was a chain link fence there hung all sorts of locks. I don't remember how we found out--perhaps we asked someone but we learned that the locks were mementos of pledged love. A couple would pledge their love to each other and fasten a lock, sometimes with their names engraved on it, to the fence. Then they would throw the key into the ocean.
It all sounds very romantic but it has become quite a problem in many areas of the world. Thousands of locks in some places have created a danger. For instance in Paris many of the locks are attached to a bridge over the Seine. Periodically they have to be cut off for fear the weight of so many metal locks could undermine the safety of the bridge. When one such bridge had a metal grill collapse under the weight of 700,000 locks that weighed a collective 93 metric tons the sides of the bridge were replaced with glass panels that have nothing a lock can be attached to.
In Paris as well as other romantic spots in the world, the ritual is considered vandalism and some places will arrest those found contributing their lock no matter how in love they are. Don't be taken in by vendors who may be looking to make money by selling you a lock. I don't think they will bail you out.
Be sure you know it is all right to place a lock before you do. Better yet, exchange rings, take pictures, post a picture to Instagram and promise to return to the place to reaffirm your pledge of love. Chances are the lock will be temporary. Love shouldn't be.