Wordpress & trailing slash on domain name
-
Hi recently changed my site so it is based on Wordpress, got my preferred domain set in Google webmaster as
but since moving to wordpress my domain is now having a slash put on the end of it like
Most of the links going to my homepage do not have the slash on the end so am I right in thinking I should get rid of the slash from my site so I have one consistent url?
If so any ideas how to banish the slash? Cannot seem to do it through the Wordpress general settings (despite preferred domain being set as www.domain.co.uk !)
Thanks
T
-
Takeshi, that was great thank you
-
Try this:
<code># BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule (.+)/$ $1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] IfModule></code>
-
Think it is a HTAccess issue, just opened it up and I have the following, do I just strip out the trailing slash on
RewriteBase /newsite/ or do I have to strip out a few more?
Don't like messing with my hataccess so any help to point me in the right direction would be great!
# BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On RewriteBase /newsite/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /newsite/index.php [L]</ifmodule> # END WordPress
-
Good point!
Just checked and www.domain.co.uk redirects to www.domain.co.uk/
This a htaccess issue perhaps?
-
Does www.domain.co.uk redirect to www.domain.co.uk/ or are they treated as separate pages?
-
Self hosted!
I have set it as www.domain.co.uk in the settings but for some reason it is still showing with the slash when I view the site
-
Are you on self hosted Wordpress or wordpress.com? Usually on self hosted you can edit the URL under general options.
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
-
H1 & H2 headers - When is too close
Hi, I have two similar headers on my site's homepage: H2: Inventory management made easy H1: Kitchen inventory management made easy Target keyword for the page: (kitchen inventory management) My question is are they too similar and would this be effecting my rankings? Should I change the H2 header to something totally different? Thank you Moz Peoples
On-Page Optimization | | vertigoventures0 -
Wordpress 'Hide Title' Feature, does this help shorten title length
Im wondering if anyone with some Wordpress experience can help me. I am using Yoast to create my page titles, but yet Moz tells me that my page titles including my actual page title tag which is 'dumfries wedding photography | Hemera Visuals' by clicking on the 'hide title' feature in wordpress will this in turn stop wordpress from automatically adding my page title and therfor bring my title length down drastically? And if so will I have to wait till google next crawls my page to see if this works? Kind Regards Cameron.
On-Page Optimization | | hemeravisuals120 -
Decrement in Domain Authority
Hi, We are a bit confused. Recently we saw a drop in Domain Authority Our organic search is increased but DA decreased By 1 what cause in decrements of DA?
On-Page Optimization | | torbett
We made all the changes suggested by MOZ for improving Domain Authority. We are confused because our organic search is increased but Domain Authority Goes Down. What should we do to improve domain authority?0 -
Wordpress duplicate titles - can't find original title tags
I added new code to rewrite the page titles <title><?php wp_title(''); ?></title> But I can't find the normal title tags in the Header PHP file in editor so I now have duplicate titles tags in the source code This is the code - can't see what else would be titles? This is the website ... http://apexgenerators.co.uk/ <title><?php wp_title(''); ?></title> eFavIcon(); ?> eCSS(); ?> enabled('Theme')) { ?> http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic" />
On-Page Optimization | | lauratagdigital0 -
Duplicate biographies across several domains?
Hey Gang, We've built a niche specific, manually edited legal community that is full of unique content. (While it's ultimately a directory, and that is often viewed as a bad word in these times, ours is a curated source that doesn't allow anyone and everyone to join.) We feel comfortable that it passes the sniff test post-panda/penguin, etc., and its doing rather well to date. The question we have is do we really need to create unique biographies for each of our legal members? Some of our competitors simply use the same bio information that the lawyer has on their own website and copies that to their site. The competitors I'm talking about are LARGE, well-respected, extremely successful folks, like FindLaw. Here's an example: Lawyer's website bio FindLaw website bio Both rank, etc., and the FindLaw code doesn't place any restrictions on their content regarding the bio., and it's an obvious exact match. I get that duplicate content is primarily a concern among one's own URL and the pages across a specific domain, using rel-canonical, etc., but what about two different domains that need to supply factual information that can't be altered? Is it anything we should worry ourselves with? Any tags we should insert in our code with regard to the bios? Thanks!!! Wayne
On-Page Optimization | | Wayne760 -
Trouble with Old Site Name
Trying to figure out what is causing a site to show up under a former name in Google. The name of the client is Fortenberry Legal. They changed from Fortenberry Law Group over a year ago. I can't find any code on the site that uses the old name. For some reason, it still shows up as "Fortenberry Law Group" in Google. When I search for "Fortenberry Law Group," that shows up in Google with a full set of site links. When I search under the new name (Fortenberry Legal), that also shows up in Google but without the site links. Any thought on what could be causing this?
On-Page Optimization | | Falconberg0 -
Brand Name URL Redirecting to Actual URL
So we have already built a site under a parent company's URL: parentcompany.com And now we have their branded product lines in directories: parentcompany.com/brand-name1, and parentcompany.com/brand-name2 We also own the actual URL Brand Name 1 (which is also the exact description of the product): brandname1.com We do not yet own the URL for Brand Name 2 (which is also the exact description of the product): brandname2.com. This is because a squatter is sitting on it and is asking $10,000+ for it. What we are trying to determine is how valuable these brand name URLs are since they will be redirecting and not the actual site's primary domain name. Anybody know how much of an effect owning those and redirecting has on ranking for those brand names that are also very descriptive of the products? Would we be smarter to spend $10,000 on adwords or 10,000 on the domain? Thanks!
On-Page Optimization | | grayloon1 -
Www1 and www domain
hi, I have a client who has an e-commerce business. My client does not want to fill the pages with too much content and has set up a www1 version with the same domain-name as the www. The plan is to create a lot of content and push www1 in ranking and then sending users (via links) to the www for ordering. Although there will be no duplicate content published on www and www1 this seems like an odd strategy, especially since the www already has a good page rank, and I'm not sure about how engines view a www.domain.com and www1domain.com situation even with unique content in each. Any thoughts?
On-Page Optimization | | vibelingo0