I just switched the site from my working files to the server.
It worked fine when I uploaded it to my portfolio but once it was on the correct domain it stopped work
Is your server sending the .svg file down with the correct MIME type? It should be image/svg+xml.
.svg
image/svg+xml
See Nginx offers of downoload SVG instead of showing it for another question along the same lines.