For a demo environment, I had to upload my Magento project to a server, without a domain name. My Magento base URL is, but as you can see when I reach it the full URL is appended behind it.

What is causing this problem?

1 Answer 1


The first thing you can check is the website's base URL from the database. To do that, log in to the database and open the table core_config_data.

Find all the entries like web/unsecure/base_url and web/secure/base_url and update these with your real base URL (like

Note the slash (/) at the last of the URL.

Remove var/cache, var/page_cache, var/view_processed, pub/static/frontend and generated folders under the document root.

Check the website again. If it does not help, check whether the server has mod_rewrite enabled or not. If it is not enabled, first enable it.

If still, there is no change, check for any rewrite rules in the .htaccess file in the document root.

I hope it should help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.