I use one hosting for all of my domains (approx. 15 of them) and I have a WordPress installed for one of them.

Let's say, my main hosting domain is: hosting.example.net

And I have installed WordPress to the subfolder: hosting.example.net/wp

Then, I've forwarded my domain www.example.com to hosting.example.net/wp WITH masking. So, I have www.example.com for all pages.

Now, here's the problematic part: Masking is not a SEO-friendly practice, because I cannot take advantage of SEO-optimized permalinks (e.g. www.example.com/books). But at the same time I do not want my hosting domain hosting.example.net to be visible (e.g. hosting.example.net/wp/books).

Is there a workaround for this to get permalinks like www.example.com/books?

  • Instead of thinking in terms of "domains", think in terms of the "filesystem". Where do abhosting.com and maindomain.com resolve to in terms of the "filesystem"?
    – DocRoot
    Jun 27 '17 at 7:21
  • Does your host support add on domains? Jun 27 '17 at 10:42
  • Hello @docroot - thank you for your answer. Can you please clarify what you meant by 'Where do abhosting.com and maindomain.com resolve to in terms of the "filesystem"'? Thanks :) Jun 27 '17 at 15:14
  • Hello @StephenOstermiller - thank you very much for your answer. Yes, my hosting allows me to host up tp 25 domains. That's actually where the problem stems from - I want to host my websites on the same hosting but I do not want my hosting URL to be visible, but want SEO-optimized permalinks with my main domain. Jun 27 '17 at 15:14
  • So can you put your main domain in as add-on domain? Then your hosting provider will use it, rather than their own. Jun 27 '17 at 15:20

There is no 'workaround' - you need to proxypass from a server registered to example.com. This means serving URLs as example.com/books but have your server source the content from hosting.example.net.

This involves configuring your server (Apache/Nginx/IIS). An example for Apache would be:

<VirtualHost *:80>
    DocumentRoot "/www/whatever"
    ServerName example.com
    ProxyPass  http://hosting.example.net/
  • It sounds like they are trying to use options available at the domain registrar without buying additional hosting. ProxyPass isn't going to be available to them there. Jun 27 '17 at 11:33
  • Exactly. I want to use only one hosting to host all of my websites. Jun 27 '17 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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