Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider deploying at subdirectory instead of subdomain #49

Open
spalladino opened this issue Dec 6, 2019 · 5 comments
Open

Consider deploying at subdirectory instead of subdomain #49

spalladino opened this issue Dec 6, 2019 · 5 comments

Comments

@spalladino
Copy link
Contributor

Keeping the docs at a subdirectory (ie openzeppelin.com/docs) is better for SEO than using a subdomain (ie docs.openzeppelin.com) (read here).

If you're a startup or small business looking to optimize your SEO, consider subdirectories over subdomains. Boosting the authority of your root domain should be a universal goal of any organization. The subdirectory strategy concentrates your keywords onto a single domain while the subdomain strategy spreads your keywords across multiple distinct domains. In a word, the subdirectory strategy results in better root domain authority. Higher domain authority leads to better search rankings which translates to more engagement.

Consider the multitude of disruptive PaaS startups with docs.disruptivepaas.com and blog.disruptivepaas.com. Why not switch to disruptivepaas.com/docs and disruptivepaas.com/blog to boost the authority of your root domain with all those docs searches and StackOverflow backlinks?

However, to avoid losing the current positioning, we need to ensure every existing page is properly 301'ed to the corresponding subdomain.

@frangio
Copy link
Contributor

frangio commented Dec 9, 2019

This can be achieved by using a Netlify rewrite in the main site (OpenZeppelin/openzeppelin.com), but I'm not sure if we can do a rewrite + a 301 redirect without causing a loop. Netlify may be smart enough to break the loop, but we have to try and see what happens.

@spalladino
Copy link
Contributor Author

Not sure I see where we would be generating the loop. The rewrite+redirect should happen only on docs.oz.com, and never if the domain is plainly oz.com.

@frangio
Copy link
Contributor

frangio commented Dec 9, 2019

I'm not sure if we're talking about the same things. Can you explain the configuration that you have in mind to implement this?

By "rewrite" I meant Netlify's feature of configuring a redirect with status 200. Thus, we would have a line like this in the redirects configuration for openzeppelin.com:

/docs/* https://docs.openzeppelin.com/:splat 200!

A loop may be generated if the redirects for the docs site then look like this:

/* https://openzeppelin.com/docs/:splat 301!

@spalladino
Copy link
Contributor Author

Thanks, now I see your point. If we test this and indeed generates a loop, we should be able to go around it by setting up a new domain that actually serves the docs, let's say docs-for-real.oz.com (as a placeholder...). So the rules would look like:

openzeppelin.com/docs/* https://docs-for-real.openzeppelin.com/:splat 200!
docs.openzeppelin.com/* https://openzeppelin.com/docs/:splat 301!

@frangio
Copy link
Contributor

frangio commented Dec 10, 2019

We can also use the *.netlify.com domain for that purpose.

@frangio frangio changed the title Deploy at subdirectory instead of subdomain Consider deploying at subdirectory instead of subdomain Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants