Socket Library 301 Moved Permanently with same location

Hello everyone!
I’ve started learning programming about 2 weeks ago and I started with the course “Python for Everybody” by Dr. Charles Severance. I am currently in chapter 12 which is about networking in python. When using the socket library and I try to connect to a website, more often than not I get a server request which says “301 Moved Permanently”. Usually it also says where the website has moved to, althought it often gives back the exact same URL I used when trying to open it. Why can’t I connect to these sites although I’ve used the correct URL? I dont want to use the urllib library yet and figure out how to connect to them using socket first, I hope someone can help me! :slight_smile: