Be aware the 2011 iMac's have hard drives that contain special temperature firmware. If you just stick any replacement drive in them, they will rev up the system fans to full throttle.
OWC sells a retrofit kit that will allow any hard drive to work, or you can use a "short" method (same one apple itself used) if you are installing a SSD drive.
OWC also has turnkey solutions if you would rather not install the kit and drive yourself.
The other method I know of is to use a software solution to control the fans after you install a new drive, but be aware that the computer will always fail the apple hardware test for the sensor if you need additional service in the future.
The forums here have had some discussions on what people did to replace their 2011 iMac hard drive, both software/shorting/OWC kit.