What directory should a site go in (url structure)?
-
Hi All,
The is the first actual SEO campaign i've worked on and I had a few question about where the site should live on the server and url structure. The site is in WP and we're using Yoast SEO.
Anyway the site lives in a a folder called Coastal, which is a child of the WWW folder. So the permalink of the homepage is mcoastalwindows.com/coastal/. The URL is mycoastalwindows.com. The thing is I can still get to the homepage or any of the pages on the site by typing in the /coastal/. Another example is permalink mycoastalwndows.com/coastal/siding/ and url mycoastalwindows.com/siding/. The urls always display without the /coastal/, so I'm not too worried about people linking to them, but Yoast puts a canonical element to the permalink and always includes the /coastal/. Also I'm seeing that Google displays a lot of the urls with the /coastal/, which is an issue seeing as we don't link to the pages that way.
My original thought was to solve this at the source and just move everything out of the coastal directory, but the developer swears that it's more secure being in another folder especially with WP. What would you all do and what is best practice? Would you move everything out of the coastal folder, 301 re-direct, do something with. htaccess, or another solution?
Appreciate the input thanks!
-
Thanks for the help guys! Appreciate it.
-
Hi Mario,
The Mozzers above are right - your best move is to get rid of the redundant /coastal/ subfolder.
Your developer is incorrect. There is no security benefit to the subfolder.
I would suggest, to ensure security, that you instead have a thorough read through this guide to Hardening WordPress and follow these methods, as they will cover you for the vast majority of hack attacks.
Also, keep regular backup copies of your database if your hosting company doesn't do this automatically. Between that and backups of the website files, you'll be well covered in the event of a hack.
Best,
Mike -
Hi,
I agree with Jeff, developers seem to have an inherited paranoia problem with Word press and security. This can be solved by using a security plug in like word fence.
Word press is built with security in mind its weakness is 3rd party plug ins so beware when installing any always look for more popular properly supported ones.
Hope this helps
Brett
-
Hi Mario,
I agree with Jeff. You need to move your site up a folder.
You could write rules that remove the '/coastal/' from the canonical URL for the Yoast plugin, 301 redirect /coastal/* to /* etc - but this is really messy.
It's fine to have your site on the root domain....it's no less secure.
-
Mario -
The biggest issue I see is that your developer thinks that having content not in the www / home directory is somehow more secure. I think this is a red flag, as literally 20% of the websites on the Internet run WordPress (including my site).
While there are security issues from time to time that crop up, keeping up to date with patches, upgrades and server settings will mitigate this.
Best practice, hands-down, is to keep your home page content in the www folder, and not in the /coastal/ folder. In a sub-folder, it's not going to perform as well from an SEO perspective. And it could hurt you, as it looks like you might be trying to "stuff" in a keyword or two.
I would recommend moving the site into the www / home directory, and setting things up so that this is the primary URL. Yes, use 301 redirects on the older links so that you don't have 404 errors on the site…
Hope this helps!
-- Jeff
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
I'm struggling to understand (and fix) why I'm getting a 404 error. The URL includes this "%5Bnull%20id=43484%5D" but I cannot find that anywhere in the referring URL. Does anyone know why please? Thanks
Can you help with how to fix this 404 error please? It appears that I have a redirect from one page to the other, although the referring page URL works, but it appears to be linking to another URL with this code at the end of the the URL - %5Bnull%20id=43484%5D that I'm struggling to find and fix. Thanks
Technical SEO | | Nichole.wynter20200 -
International SEO - Hreflang tags and URL Structure
Hello, I wonder if any SEO internationalisation experts can help. We are a UK centric business with a .com domain which all our traffic currently goes to. We have been growing in the US and are therefore looking to internationalise our website by building out some US pages using the subfolder .com/us. Since the keywords we wish to target in the US are different to the keywords we are targeting elsewhere, when implementing hreflang tags is it possible to use a different URL for the US page? So let’s say we are targeting ‘estate car’ generally but want to target ’station wagon’ as the keyword for the equivalent US page, can the URLs be different? Example: General page: www.example.com/estate-car US: www.example.com/us/station-wagon Hreflang tags: Would that be the correct implementation? Any help or guidance would be much appreciated!
Technical SEO | | SEOCT0 -
New SEO manager needs help! Currently only about 15% of our live sitemap (~4 million url e-commerce site) is actually indexed in Google. What are best practices sitemaps for big sites with a lot of changing content?
In Google Search console 4,218,017 URLs submitted 402,035 URLs indexed what is the best way to troubleshoot? What is best guidance for sitemap indexation of large sites with a lot of changing content? view?usp=sharing
Technical SEO | | Hamish_TM1 -
New URL Structure
Hi Guy's, For our webshop we're considering a new URL structure because longtail keywords to rank so well. Now we have /category (main focus keywords)
Technical SEO | | Happy-SEO
/product/the-product345897345123/ (nice to rank on, not that much volume) We have over 500 categories and every one of them is placed after our domain. Because i think it's better to work with a good structure and managed a way to make categories and sub-categories. The 500 categories may be the case why not every one of them is ranking so well, so that was also the choice of thinking about a new structure. So the new URL structure will be: /category (main focus keywords)
/category/subcat/ (also main focus keywords) Everything will be redirect (301, good way), so i think there won't be to much problems. I'm thinking about what to do with the /product/ URL. Because now it will be on the same level as the subcategories, and i'm affraid that when it's on that level, Google will give the same value to both of them. My options that i'm considering are: **Old way **
/product/the-product-345897345123/ .html (seen this on big webshops)
/product/the-product-345897345123.html/ Level deeper SKU /product/the-product/345897345123/ What would you suggest? The new structure would be 20 categories 500+ sub's devided under main categories 5000+ products Thanks!0 -
How could you make a URL/Breadcrumb structure appear different in Google than when you click into site?
I'm seeing a competitor be able to make their URL/Breadcrumb stucture appear different in Google than on the site. Google shows a 3-4 category silo for the page but once clicked the page is off root. How could you do this?
Technical SEO | | TicketCity0 -
Should I go with a Mobile Site or Responsive Design
So I work with a Video Editing Plugin company and we have hit a bit of a conundrum with our mobile site plan. At first we were going to a stripped down version of our current site since the customer base has yet to purchase off mobile and almost all of the web traffic comes from a full computer. ( As video editing on tablets still leaves a bit to be desired). I was thinking a mobile site, but at the same point, I don't want to have issues when it comes to URLs and what not. Given that a majority of our traffic is non mobile. Would it be better to design a separate stripped down mobile site, or would responsive still be the better choice? Are mobile specific sites becoming old fashion?
Technical SEO | | TodorF.1 -
URL Structure for Deal Aggregator
I have a website that aggregates deals from various daily deals site. I originally had all the deals on one page /deals, however I thought that maybe it might be more useful to have several pages e.g. /beautydeals or /hoteldeals. However if I give every section it's own page that means I have either no current deals on the main /deals page or I will have duplicate content. I'm wondering what might be the best approach here? A few of the options that come to mind are: 1. Return to having all the deals on one page /deals and linking internally to content within that page
Technical SEO | | andywozhere
2. Have both a main /deals page with all of the deals plus other pages such as /beautydeals, but add re="canonical" to point to the main /deals page
3. Create new content for the /deals page... however I think people will probably want to see at least some deals straight away, rather than having to click through to another page.
4. Display some sub-categories on the main /deals page, but have separate URLs for other more popular sub-categories e.g. /beautydeals (this is how it works at the moment) I should probably point out that the site also has other content such as events and a directory. Any suggestions on how best to approach this much appreciated! Cheers, Andy0 -
Will 301 redirecting a site multiple times still preserve the original site value?
Hi, All! If site www.abc.com was already 301 redirected to site www.def.com, and now the site owner wants to redirect www.def.com to www.ghi.com - is there any concern that it's not going to work, and some of the original linkjuice, rank, trust, etc. is going to vanish? Or as long as the 301s are set up right, should you be able to 301 indefinitely? Does anyone have any experience with actually doing this and seeing good/bad/neutral results? Thanks in advance! -Aviva B
Technical SEO | | debi_zyx0