3

I've been working on a web platform project for a client, and we are nearing completion. Basically, the platform is a small social network for a specific group of people.

Part of the specification is to allow Vanity URLs for example (example.io/JoeBloggs), that would redirect to the user profile. This in its self is easy to do via .htaccess, my issue comes because the client has built a "marketing page" at wix which is at the base domain of example.io, and the platform is at app.example.io. (They wanted to use wix for the marketing page so they can edit it freely and easily)

The marketing page has login/signup links that simply take you to app.example.io/login etc.

This means that my vanity URLs are app.example.io/JoeBloggs, and they want the app. removed from the URL. After researching, the only way I can think of achieving the URLs that they want would be to move the marking page to a subdomain for example info.example.io and the platform to the base domain example.io.

Then in .htaccess check if they access they base domain alone (example.io) or if they accessed a page (example.io/login or example.io/JoeBloggs), if they access the base domain redirect them to info.example.io, otherwise let them access the page as normal.

Obviously, I don't want to hurt the SEO of the site, as they already have a presence from an old version that was a hardcoded html marketing page at index.html.

Is this the best way to achieve this or did I miss something that is going to be a problem?

  • Have you considered trying to configure some type of reverse proxy for the "marketing page" (instead of the redirect) to effectively serve everything from the bare domain? However, this might be (very) hard to set up as Wix might actively try to block this and the info subdomain might still be discoverable (and indexable), unless you can configure something at the Wix end to prevent this? – MrWhite Apr 2 '18 at 23:12
  • I did try to just echo the code using file_get_contents(), it would complain that it couldn't find some javascript files. – Ashley Williams Apr 3 '18 at 9:07
1

The most important thing to do at this point is to take a step back and analyze your approach.

According to Wix:

Wix is a website builder, and all of its content is hosted on Wix's servers.

Because of this fact, this severely limits the development potential that a developer will have when attempting to create custom functionality, as you described in your post.

The trade-off, as you concluded, is ease of use vs. freedom and ownership.

Part of the responsibility of developing a web application, as the more knowledgeable party, is to show your client what they need.

Personally, if I were in your shoes, I would attempt to convince your client to invest in a custom website or to use a more developer-friendly platform, such as Wordpress.

It's more important to make sure that you are building on a firm foundation than to stress about SEO so early in your project, in my opinion.

That said, if your client will not budge, you may want to look into the Wix Code API:

import wixLocation from 'wix-location';

wixLocation.to( 'https://example.io/destination' );

This is not the best solution for SEO, but it should work.

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.