Instead of dragging the link to the dock, drag it first to the desktop. Then select the the icon you want. Press "command i" and in the top left corner, you should see a miniature icon in the new window. Click it and a blue highlight will border the icon. Then press "command c". Next go to the url on your desktop, click it and then press "command i". Click the button in the top left corner, and again, a blue light will border the icon. Then press "command v." It should change the icon. Then exit the window, and just drag the icon to the right side of the dock.