Parts of the coastline, which attracts six million visitors every year, have been shut to activities including swimming and surfing.