I have a wordpress website. In the website url section it automatically adds the port :80 at the end. It also adds the same port to every link on the website and to permalinks. This is a big issue for my employer because it is bad for SEO supposedly. Howevery, when I try to change the ‘example.com:80’ to just ‘example.com’ the website becomes unreachable with 301 error coming up. However, I am still able to log into wordpress admin section. So, is there a way to either remove ports from permalinks manually somewhere or if there is a way to change the website url so that it does not have the port in it.
http://example.com:80/sample-post/ – this is the example of the permalink
http://example.com/sample-post/ – this is what is desirable
Thank you
2
Answers
In your wordpress settings, change the site url and wp url to your domain without :80. Port 80 is the default http port and so that is what your webserver listens on anyway (unless explicitly set up otherwise).
Update
Not sure about your exact setup, but here is what you should add to your
.htaccess
to redirect all requests to :80 explicitly.Change
example.org
to your domain.Disable Canonical URL Redirection
Drop the plugin into your wp-content/plugins directory and we will then need to activate it outside the admin area by fixing the database directly (I used Sequel Pro). Here’s how:
http://localhost:8080/ should now work correctly.
Just remember to disable/remove the plugin in production environment. The SQL values you just fudged would be correctly resaved once you have access to the admin section.